pub struct MctpUsbHandler { /* private fields */ }
Implementations§
Source§impl MctpUsbHandler
impl MctpUsbHandler
pub fn new() -> Self
Sourcepub fn decode(xfer: &[u8]) -> Result<(&[u8], &[u8])>
pub fn decode(xfer: &[u8]) -> Result<(&[u8], &[u8])>
Returns (mctp_packet, remainder).
xfer
an input buffer, starting at a MCTP over USB header
and containing at least one MCTP packet.
mctp_packet
is the portion after the MCTP over USB header.
remainder
is the remaining portion of xfer (which can be
passed to a subsequent decode()
call).
pub fn receive<'f>( xfer: &[u8], mctp: &'f mut Stack, ) -> Result<Option<(MctpMessage<'f>, ReceiveHandle)>>
pub fn send_fill<F>( &mut self, eid: Eid, typ: MsgType, tag: Option<Tag>, ic: MsgIC, cookie: Option<AppCookie>, xfer: &mut impl MctpUsbXfer, mctp: &mut Stack, fill_msg: F, ) -> SendOutput<'_>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MctpUsbHandler
impl RefUnwindSafe for MctpUsbHandler
impl Send for MctpUsbHandler
impl Sync for MctpUsbHandler
impl Unpin for MctpUsbHandler
impl UnwindSafe for MctpUsbHandler
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