pub struct BMDataHeader(/* private fields */);Expand description
Busmust data header, each BMData contains a header which indicates payload information.
Implementations§
Source§impl BMDataHeader
impl BMDataHeader
pub const fn new() -> Self
Sourcepub const fn with_kind(self, value: u8) -> Self
pub const fn with_kind(self, value: u8) -> Self
Data type, see BMDataType for details.
Bits: 0..4
Sourcepub const fn with_flags(self, value: u8) -> Self
pub const fn with_flags(self, value: u8) -> Self
Reserved flags, keep 0
Bits: 4..8
Sourcepub fn set_dchn(&mut self, value: u8)
pub fn set_dchn(&mut self, value: u8)
Destination channel ID, starting from zero, used by TX data to indicate the hardware about the target port.
Bits: 8..12
Sourcepub const fn with_dchn(self, value: u8) -> Self
pub const fn with_dchn(self, value: u8) -> Self
Destination channel ID, starting from zero, used by TX data to indicate the hardware about the target port.
Bits: 8..12
Sourcepub const fn dchn(&self) -> u8
pub const fn dchn(&self) -> u8
Destination channel ID, starting from zero, used by TX data to indicate the hardware about the target port.
Bits: 8..12
Sourcepub fn set_schn(&mut self, value: u8)
pub fn set_schn(&mut self, value: u8)
Source channel ID, starting from zero, used by RX data to indicate the application about the source port.
Bits: 12..16
Trait Implementations§
Source§impl Clone for BMDataHeader
impl Clone for BMDataHeader
Source§fn clone(&self) -> BMDataHeader
fn clone(&self) -> BMDataHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BMDataHeader
impl Debug for BMDataHeader
Source§impl Default for BMDataHeader
impl Default for BMDataHeader
Source§fn default() -> BMDataHeader
fn default() -> BMDataHeader
Returns the “default value” for a type. Read more
Source§impl From<BMDataHeader> for u16
impl From<BMDataHeader> for u16
Source§fn from(v: BMDataHeader) -> u16
fn from(v: BMDataHeader) -> u16
Converts to this type from the input type.
Source§impl From<u16> for BMDataHeader
impl From<u16> for BMDataHeader
impl Copy for BMDataHeader
Auto Trait Implementations§
impl Freeze for BMDataHeader
impl RefUnwindSafe for BMDataHeader
impl Send for BMDataHeader
impl Sync for BMDataHeader
impl Unpin for BMDataHeader
impl UnwindSafe for BMDataHeader
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