Struct MctpMessage

Source
pub struct MctpMessage<'buffer, M: MctpMedium> {
    pub reply_context: MctpReplyContext<M>,
    pub message_buffer: MctpMessageBuffer<'buffer>,
    pub message_integrity_check: Option<u8>,
}

Fields§

§reply_context: MctpReplyContext<M>§message_buffer: MctpMessageBuffer<'buffer>§message_integrity_check: Option<u8>

Implementations§

Source§

impl<'buffer, M: MctpMedium> MctpMessage<'buffer, M>

Source

pub fn can_parse_as<P: MctpMessageTrait<'buffer>>(&self) -> bool

Source

pub fn parse_as<P: MctpMessageTrait<'buffer>>( &self, ) -> MctpPacketResult<(P::Header, P), M>

Trait Implementations§

Source§

impl<'buffer, M: Debug + MctpMedium> Debug for MctpMessage<'buffer, M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'buffer, M: MctpMedium> Format for MctpMessage<'buffer, M>
where MctpReplyContext<M>: Format, MctpMessageBuffer<'buffer>: Format, Option<u8>: Format,

Source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.
Source§

impl<'buffer, M: PartialEq + MctpMedium> PartialEq for MctpMessage<'buffer, M>

Source§

fn eq(&self, other: &MctpMessage<'buffer, M>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'buffer, M: Eq + MctpMedium> Eq for MctpMessage<'buffer, M>

Source§

impl<'buffer, M: MctpMedium> StructuralPartialEq for MctpMessage<'buffer, M>

Auto Trait Implementations§

§

impl<'buffer, M> Freeze for MctpMessage<'buffer, M>

§

impl<'buffer, M> RefUnwindSafe for MctpMessage<'buffer, M>

§

impl<'buffer, M> Send for MctpMessage<'buffer, M>
where <M as MctpMedium>::ReplyContext: Send,

§

impl<'buffer, M> Sync for MctpMessage<'buffer, M>
where <M as MctpMedium>::ReplyContext: Sync,

§

impl<'buffer, M> Unpin for MctpMessage<'buffer, M>
where <M as MctpMedium>::ReplyContext: Unpin,

§

impl<'buffer, M> UnwindSafe for MctpMessage<'buffer, M>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.