pub struct SmbusEspiMedium;Trait Implementations§
Source§impl Clone for SmbusEspiMedium
impl Clone for SmbusEspiMedium
Source§fn clone(&self) -> SmbusEspiMedium
fn clone(&self) -> SmbusEspiMedium
Returns a duplicate 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 Debug for SmbusEspiMedium
impl Debug for SmbusEspiMedium
Source§impl Format for SmbusEspiMedium
impl Format for SmbusEspiMedium
Source§impl MctpMedium for SmbusEspiMedium
impl MctpMedium for SmbusEspiMedium
Source§type Frame = SmbusEspiMediumFrame
type Frame = SmbusEspiMediumFrame
the medium specific header and trailer for the packet
type ReplyContext = SmbusEspiReplyContext
Source§type Encoding = PassthroughEncoding
type Encoding = PassthroughEncoding
the byte-stuffing transform used by this medium when (de)serializing
wire bytes. Stateless — see [
crate::buffer_encoding]. Most media
use PassthroughEncoding
(no transform); media that need byte-stuffing (e.g., DSP0253 serial)
supply their own impl.Source§fn deserialize<'buf>(
&self,
packet: &'buf [u8],
) -> MctpPacketResult<(Self::Frame, EncodingDecoder<'buf, Self::Encoding>), Self>
fn deserialize<'buf>( &self, packet: &'buf [u8], ) -> MctpPacketResult<(Self::Frame, EncodingDecoder<'buf, Self::Encoding>), Self>
Deserialize a packet into the medium-specific header (frame) and an
EncodingDecoder that wraps the inner stuffed-region bytes.
Higher layers (e.g., parse_transport_header, the payload copy
loop in MctpPacketContext) read decoded bytes through the
returned decoder and physically cannot bypass the medium’s
encoding by slicing the underlying buffer directly.Source§fn serialize<'buf, F>(
&self,
reply_context: Self::ReplyContext,
buffer: &'buf mut [u8],
message_writer: F,
) -> MctpPacketResult<&'buf [u8], Self>
fn serialize<'buf, F>( &self, reply_context: Self::ReplyContext, buffer: &'buf mut [u8], message_writer: F, ) -> MctpPacketResult<&'buf [u8], Self>
Serialize a packet by allowing the caller’s
message_writer
closure to write decoded bytes into the medium’s stuffed region
through an EncodingEncoder. The medium owns its outer framing
(e.g., SMBus header + PEC, DSP0253 start/end flags + FCS) and
inspects the encoder’s
wire_position after the
closure returns to size headers/trailers and compute checksums.Source§fn max_message_body_size(&self) -> usize
fn max_message_body_size(&self) -> usize
the maximum transmission unit for the medium
Source§impl MctpMediumFrame<SmbusEspiMedium> for SmbusEspiMediumFrame
impl MctpMediumFrame<SmbusEspiMedium> for SmbusEspiMediumFrame
fn packet_size(&self) -> usize
fn reply_context(&self) -> SmbusEspiReplyContext
Source§impl PartialEq for SmbusEspiMedium
impl PartialEq for SmbusEspiMedium
impl Copy for SmbusEspiMedium
impl Eq for SmbusEspiMedium
impl StructuralPartialEq for SmbusEspiMedium
Auto Trait Implementations§
impl Freeze for SmbusEspiMedium
impl RefUnwindSafe for SmbusEspiMedium
impl Send for SmbusEspiMedium
impl Sync for SmbusEspiMedium
impl Unpin for SmbusEspiMedium
impl UnsafeUnpin for SmbusEspiMedium
impl UnwindSafe for SmbusEspiMedium
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