pub struct Header(pub u16);
Tuple Fields§
§0: u16
Implementations§
source§impl Header
impl Header
pub fn extended(&self) -> bool
pub fn with_extended(self, value: bool) -> Self
pub fn set_extended(&mut self, value: bool)
pub fn num_objects(&self) -> usize
pub fn with_num_objects(self, value: u8) -> Self
pub fn set_num_objects(&mut self, value: u8)
pub fn message_id(&self) -> u8
pub fn with_message_id(self, value: u8) -> Self
pub fn set_message_id(&mut self, value: u8)
pub fn port_power_role(&self) -> PowerRole
pub fn with_port_power_role(self, value: PowerRole) -> Self
pub fn set_port_power_role(&mut self, value: PowerRole)
pub fn spec_revision(&self) -> SpecificationRevision
pub fn with_spec_revision(self, value: SpecificationRevision) -> Self
pub fn set_spec_revision(&mut self, value: SpecificationRevision)
pub fn port_data_role(&self) -> DataRole
pub fn with_port_data_role(self, value: DataRole) -> Self
pub fn set_port_data_role(&mut self, value: DataRole)
pub fn message_type_raw(&self) -> u8
pub fn with_message_type_raw(self, value: u8) -> Self
pub fn set_message_type_raw(&mut self, value: u8)
source§impl Header
impl Header
pub fn from_bytes(buf: &[u8]) -> Self
pub fn to_bytes(&self, buf: &mut [u8])
pub fn message_type(&self) -> MessageType
Trait Implementations§
source§impl PartialEq for Header
impl PartialEq for Header
impl Copy for Header
impl Eq for Header
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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
source§impl<T, U> UnsafeFrom<U> for Twhere
U: Into<T>,
impl<T, U> UnsafeFrom<U> for Twhere
U: Into<T>,
source§unsafe fn unsafe_from(other: U) -> T
unsafe fn unsafe_from(other: U) -> T
Calls U::into(other)
.
That is, this conversion is whatever the implementation of Into
<T> for U
chooses to
do.
source§impl<T, U> UnsafeInto<U> for Twhere
U: UnsafeFrom<T>,
impl<T, U> UnsafeInto<U> for Twhere
U: UnsafeFrom<T>,
source§unsafe fn unsafe_into(self) -> U
unsafe fn unsafe_into(self) -> U
Calls U::unsafe_from(self)
.
That is, this conversion is whatever the implementation of UnsafeFrom
<T> for U
chooses to do.