pub(crate) struct Encoder {
kind: Kind,
is_last: bool,
}
Expand description
Encoders to handle different Transfer-Encodings.
Fields§
§kind: Kind
§is_last: bool
Implementations§
Source§impl Encoder
impl Encoder
fn new(kind: Kind) -> Encoder
pub(crate) fn chunked() -> Encoder
pub(crate) fn length(len: u64) -> Encoder
pub(crate) fn into_chunked_with_trailing_fields( self, trailers: Vec<HeaderValue>, ) -> Encoder
pub(crate) fn is_eof(&self) -> bool
pub(crate) fn is_last(&self) -> bool
pub(crate) fn is_close_delimited(&self) -> bool
pub(crate) fn is_chunked(&self) -> bool
pub(crate) fn end<B>(&self) -> Result<Option<EncodedBuf<B>>, NotEof>
pub(crate) fn encode<B>(&mut self, msg: B) -> EncodedBuf<B>where
B: Buf,
pub(crate) fn encode_trailers<B>( &self, trailers: HeaderMap, title_case_headers: bool, ) -> Option<EncodedBuf<B>>
pub(super) fn encode_and_end<B>(
&self,
msg: B,
dst: &mut WriteBuf<EncodedBuf<B>>,
) -> boolwhere
B: Buf,
Trait Implementations§
impl StructuralPartialEq for Encoder
Auto Trait Implementations§
impl Freeze for Encoder
impl RefUnwindSafe for Encoder
impl Send for Encoder
impl Sync for Encoder
impl Unpin for Encoder
impl UnwindSafe for Encoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more