pub struct MessageDecoder { /* private fields */ }Expand description
A stateful reader for decoding IPC messages from an arbitrary stream of bytes.
Implementations§
Source§impl MessageDecoder
impl MessageDecoder
Sourcepub fn new(registry: ArrayRegistry) -> Self
pub fn new(registry: ArrayRegistry) -> Self
Create a new message decoder that can lookup encodings in the given registry.
Sourcepub fn read_next<B: AlignedBuf>(
&mut self,
bytes: &mut B,
) -> VortexResult<PollRead>
pub fn read_next<B: AlignedBuf>( &mut self, bytes: &mut B, ) -> VortexResult<PollRead>
Attempt to read the next message from the bytes object.
If the message is incomplete, the function will return NeedMore with the total number
of bytes needed to make progress. The next call to read_next should provide at least
this number of bytes otherwise it will be given the same NeedMore response.
Auto Trait Implementations§
impl !Freeze for MessageDecoder
impl !RefUnwindSafe for MessageDecoder
impl Send for MessageDecoder
impl Sync for MessageDecoder
impl Unpin for MessageDecoder
impl !UnwindSafe for MessageDecoder
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> 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