pub struct MessagesDecoder<I, A, B> { /* private fields */ }Expand description
A zero-copy decoder for Messages.
Implementations§
Source§impl<I, A, B> MessagesDecoder<I, A, B>
impl<I, A, B> MessagesDecoder<I, A, B>
Sourcepub fn new(buf: B) -> Result<MessagesDecoder<I, A, B>, DecodeError>
pub fn new(buf: B) -> Result<MessagesDecoder<I, A, B>, DecodeError>
Creates a new decoder.
Sourcepub fn into_inner(self) -> B
pub fn into_inner(self) -> B
Returns the buffer.
Sourcepub fn iter(&self) -> MessagesDecoderIter<'_, I, A, B> ⓘ
pub fn iter(&self) -> MessagesDecoderIter<'_, I, A, B> ⓘ
Returns an iterator to yield the messages.
Trait Implementations§
Auto Trait Implementations§
impl<I, A, B> Freeze for MessagesDecoder<I, A, B>where
B: Freeze,
impl<I, A, B> RefUnwindSafe for MessagesDecoder<I, A, B>
impl<I, A, B> Send for MessagesDecoder<I, A, B>
impl<I, A, B> Sync for MessagesDecoder<I, A, B>
impl<I, A, B> Unpin for MessagesDecoder<I, A, B>
impl<I, A, B> UnsafeUnpin for MessagesDecoder<I, A, B>where
B: UnsafeUnpin,
impl<I, A, B> UnwindSafe for MessagesDecoder<I, A, B>
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more