Struct cuprate_levin::codec::LevinMessageCodec
source · pub struct LevinMessageCodec<T: LevinBody> { /* private fields */ }Expand description
A tokio-codec for levin messages or in other words the decoded body of a levin bucket.
Trait Implementations§
source§impl<T: Clone + LevinBody> Clone for LevinMessageCodec<T>
impl<T: Clone + LevinBody> Clone for LevinMessageCodec<T>
source§fn clone(&self) -> LevinMessageCodec<T>
fn clone(&self) -> LevinMessageCodec<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<T: LevinBody> Decoder for LevinMessageCodec<T>
impl<T: LevinBody> Decoder for LevinMessageCodec<T>
§type Error = BucketError
type Error = BucketError
The type of unrecoverable frame decoding errors. Read more
source§fn decode(
&mut self,
src: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode( &mut self, src: &mut BytesMut, ) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
source§impl<T: LevinBody> Default for LevinMessageCodec<T>
impl<T: LevinBody> Default for LevinMessageCodec<T>
source§impl<T: LevinBody> Encoder<LevinMessage<T>> for LevinMessageCodec<T>
impl<T: LevinBody> Encoder<LevinMessage<T>> for LevinMessageCodec<T>
Auto Trait Implementations§
impl<T> Freeze for LevinMessageCodec<T>
impl<T> RefUnwindSafe for LevinMessageCodec<T>
impl<T> Send for LevinMessageCodec<T>
impl<T> Sync for LevinMessageCodec<T>
impl<T> Unpin for LevinMessageCodec<T>
impl<T> UnwindSafe for LevinMessageCodec<T>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.