pub struct Coder<S, C = FeaturedCode> { /* private fields */ }Expand description
A coder type that can be used for either encode or decode which determined by De type.
Implementations§
Trait Implementations§
Source§impl<S, C> Body for Coder<S, C>
impl<S, C> Body for Coder<S, C>
Source§type Data = <C as Code<<S as Body>::Data>>::Item
type Data = <C as Code<<S as Body>::Data>>::Item
The payload data type yielded by
Frame::Data variants.Source§type Error = Box<dyn Error + Send + Sync>
type Error = Box<dyn Error + Send + Sync>
The error type that can occur while producing frames.
Source§fn poll_frame(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>
fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>
Attempt to pull the next frame from the body. Read more
Source§fn is_end_stream(&self) -> bool
fn is_end_stream(&self) -> bool
Indicates whether the body has been fully consumed. Read more
impl<'__pin, S, C> Unpin for Coder<S, C>where
PinnedFieldsOf<__Origin<'__pin, S, C>>: Unpin,
Auto Trait Implementations§
impl<S, C> Freeze for Coder<S, C>
impl<S, C> RefUnwindSafe for Coder<S, C>where
S: RefUnwindSafe,
C: RefUnwindSafe,
impl<S, C> Send for Coder<S, C>
impl<S, C> Sync for Coder<S, C>
impl<S, C> UnsafeUnpin for Coder<S, C>where
S: UnsafeUnpin,
C: UnsafeUnpin,
impl<S, C> UnwindSafe for Coder<S, C>where
S: UnwindSafe,
C: UnwindSafe,
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