pub struct MctpPacketContext<'buf, M: MctpMedium> { /* private fields */ }Expand description
Context for serializing and deserializing an MCTP message, which may be split among multiple packets.
Implementations§
Source§impl<'buf, M: MctpMedium> MctpPacketContext<'buf, M>
impl<'buf, M: MctpMedium> MctpPacketContext<'buf, M>
pub fn new(medium: M, packet_assembly_buffer: &'buf mut [u8]) -> Self
pub fn deserialize_packet( &mut self, packet: &[u8], ) -> MctpPacketResult<Option<MctpMessage<'_, M>>, M>
pub fn serialize_packet<P: MctpMessageTrait<'buf>>( &'buf mut self, reply_context: MctpReplyContext<M>, message: (P::Header, P), ) -> MctpPacketResult<SerializePacketState<'buf, M>, M>
Auto Trait Implementations§
impl<'buf, M> Freeze for MctpPacketContext<'buf, M>where
M: Freeze,
impl<'buf, M> RefUnwindSafe for MctpPacketContext<'buf, M>where
M: RefUnwindSafe,
impl<'buf, M> Send for MctpPacketContext<'buf, M>where
M: Send,
impl<'buf, M> Sync for MctpPacketContext<'buf, M>where
M: Sync,
impl<'buf, M> Unpin for MctpPacketContext<'buf, M>where
M: Unpin,
impl<'buf, M> !UnwindSafe for MctpPacketContext<'buf, M>
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