pub struct ReceivedMessage<'a, T: 'a, C: CodecFor<T>> { /* private fields */ }Expand description
A handle to a decoded received message.
For an owning codec such as consortium_codec::PostcardCodec
(Decoded<'buf> = T) this owns the decoded T - the 'a
lifetime is unused and the value can be moved out freely via
into_inner.
For a future zero-copy codec 'a will borrow the channel’s
internal receive buffer, preventing a second recv() call
while this handle is live. Application code using Deref
does not need to change.
Implementations§
Source§impl<'a, T, C: CodecFor<T>> ReceivedMessage<'a, T, C>
impl<'a, T, C: CodecFor<T>> ReceivedMessage<'a, T, C>
Sourcepub fn into_inner(self) -> C::Decoded<'a>
pub fn into_inner(self) -> C::Decoded<'a>
Consume the handle and return the inner decoded value.
Trait Implementations§
Source§impl<'a, T, C> Debug for ReceivedMessage<'a, T, C>
impl<'a, T, C> Debug for ReceivedMessage<'a, T, C>
Auto Trait Implementations§
impl<'a, T, C> Freeze for ReceivedMessage<'a, T, C>
impl<'a, T, C> RefUnwindSafe for ReceivedMessage<'a, T, C>
impl<'a, T, C> Send for ReceivedMessage<'a, T, C>
impl<'a, T, C> Sync for ReceivedMessage<'a, T, C>
impl<'a, T, C> Unpin for ReceivedMessage<'a, T, C>
impl<'a, T, C> UnsafeUnpin for ReceivedMessage<'a, T, C>
impl<'a, T, C> UnwindSafe for ReceivedMessage<'a, T, C>
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