pub struct EncapsulatedInterfaceRequest<'buf> {
pub mei_type: MeiType,
pub data: &'buf [u8],
}Expand description
FC 0x2B — Encapsulated Interface Transport request.
The MEI type selects the transport variant (e.g. CANopen General Reference
or Read Device Identification). The remaining data is MEI-type-specific.
Fields§
§mei_type: MeiTypeMEI type code.
data: &'buf [u8]MEI-type-specific data.
Implementations§
Source§impl<'buf> EncapsulatedInterfaceRequest<'buf>
impl<'buf> EncapsulatedInterfaceRequest<'buf>
Sourcepub fn decode(data: &'buf [u8]) -> Result<Self, DecodeError>
pub fn decode(data: &'buf [u8]) -> Result<Self, DecodeError>
Decode from PDU data after the function code byte.
§Errors
Returns DecodeError::Truncated if data is empty.
Returns DecodeError::UnknownMeiType if the MEI type byte is not recognized.
Returns DecodeError::LengthMismatch if a known fixed-length MEI request has extra bytes.
Trait Implementations§
Source§impl<'buf> Clone for EncapsulatedInterfaceRequest<'buf>
impl<'buf> Clone for EncapsulatedInterfaceRequest<'buf>
Source§fn clone(&self) -> EncapsulatedInterfaceRequest<'buf>
fn clone(&self) -> EncapsulatedInterfaceRequest<'buf>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'buf> Copy for EncapsulatedInterfaceRequest<'buf>
Source§impl<'buf> Debug for EncapsulatedInterfaceRequest<'buf>
impl<'buf> Debug for EncapsulatedInterfaceRequest<'buf>
Source§impl Encode for EncapsulatedInterfaceRequest<'_>
impl Encode for EncapsulatedInterfaceRequest<'_>
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).
impl<'buf> Eq for EncapsulatedInterfaceRequest<'buf>
Source§impl<'buf> PartialEq for EncapsulatedInterfaceRequest<'buf>
impl<'buf> PartialEq for EncapsulatedInterfaceRequest<'buf>
Source§fn eq(&self, other: &EncapsulatedInterfaceRequest<'buf>) -> bool
fn eq(&self, other: &EncapsulatedInterfaceRequest<'buf>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'buf> StructuralPartialEq for EncapsulatedInterfaceRequest<'buf>
Auto Trait Implementations§
impl<'buf> Freeze for EncapsulatedInterfaceRequest<'buf>
impl<'buf> RefUnwindSafe for EncapsulatedInterfaceRequest<'buf>
impl<'buf> Send for EncapsulatedInterfaceRequest<'buf>
impl<'buf> Sync for EncapsulatedInterfaceRequest<'buf>
impl<'buf> Unpin for EncapsulatedInterfaceRequest<'buf>
impl<'buf> UnsafeUnpin for EncapsulatedInterfaceRequest<'buf>
impl<'buf> UnwindSafe for EncapsulatedInterfaceRequest<'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