pub struct MctpControlMsg<'a> {
pub header: MCTPControlMessageHeader<[u8; 2]>,
pub body: &'a [u8],
}
Fields§
§header: MCTPControlMessageHeader<[u8; 2]>
§body: &'a [u8]
Implementations§
Source§impl<'a> MctpControlMsg<'a>
impl<'a> MctpControlMsg<'a>
pub fn from_buf(buf: &'a [u8]) -> ControlResult<Self>
pub fn new_resp<'f>(&self, body: &'f [u8]) -> ControlResult<MctpControlMsg<'f>>
pub fn slices(&self) -> [&[u8]; 2]
Sourcepub fn command_code(&self) -> Result<CommandCode, u8>
pub fn command_code(&self) -> Result<CommandCode, u8>
Extract the MCTP control message command code.
Unrecognised values will return Err
.
Auto Trait Implementations§
impl<'a> Freeze for MctpControlMsg<'a>
impl<'a> RefUnwindSafe for MctpControlMsg<'a>
impl<'a> Send for MctpControlMsg<'a>
impl<'a> Sync for MctpControlMsg<'a>
impl<'a> Unpin for MctpControlMsg<'a>
impl<'a> UnwindSafe for MctpControlMsg<'a>
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