pub struct EncapsulatedInterfaceResponse<'buf> {
pub mei_type: MeiType,
pub data: &'buf [u8],
}Expand description
Response to an Encapsulated Interface Transport request (FC 0x2B).
Fields§
§mei_type: MeiTypeThe MEI type code.
data: &'buf [u8]MEI-specific data bytes.
Implementations§
Source§impl<'buf> EncapsulatedInterfaceResponse<'buf>
impl<'buf> EncapsulatedInterfaceResponse<'buf>
Sourcepub fn decode(data: &'buf [u8]) -> Result<Self, DecodeError>
pub fn decode(data: &'buf [u8]) -> Result<Self, DecodeError>
Decode from the data bytes following the function code.
§Errors
Returns DecodeError::Truncated if data is too short.
Returns DecodeError::UnknownMeiType if the MEI type byte is not
recognized.
Returns DecodeError if a known MEI response payload is malformed.
Trait Implementations§
Source§impl<'buf> Debug for EncapsulatedInterfaceResponse<'buf>
impl<'buf> Debug for EncapsulatedInterfaceResponse<'buf>
Source§impl Encode for EncapsulatedInterfaceResponse<'_>
impl Encode for EncapsulatedInterfaceResponse<'_>
Source§fn encode_into(&self, buf: &mut [u8]) -> Result<usize, EncodeError>
fn encode_into(&self, buf: &mut [u8]) -> Result<usize, EncodeError>
Write the full PDU (function code + data) into
buf. Read moreSource§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Total encoded length in bytes (including the function code byte).
Auto Trait Implementations§
impl<'buf> Freeze for EncapsulatedInterfaceResponse<'buf>
impl<'buf> RefUnwindSafe for EncapsulatedInterfaceResponse<'buf>
impl<'buf> Send for EncapsulatedInterfaceResponse<'buf>
impl<'buf> Sync for EncapsulatedInterfaceResponse<'buf>
impl<'buf> Unpin for EncapsulatedInterfaceResponse<'buf>
impl<'buf> UnsafeUnpin for EncapsulatedInterfaceResponse<'buf>
impl<'buf> UnwindSafe for EncapsulatedInterfaceResponse<'buf>
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