Enum can_type_rs::identifier::Id
source · pub enum Id {
Standard(u16),
Extended(u32),
J1939(J1939Id),
}Variants§
Implementations§
source§impl Id
impl Id
pub fn from_bits(bits: u32, extended: bool) -> Self
pub fn from_hex(hex_str: &str, extended: bool) -> Self
pub fn try_from_bits(bits: u32, extended: bool) -> Option<Self>
pub fn try_from_hex(hex_str: &str, extended: bool) -> Option<Self>
pub fn into_bits(self) -> u32
pub fn into_hex(self) -> String
sourcepub fn standard_id(self) -> Self
pub fn standard_id(self) -> Self
Returns the Base ID part of this extended identifier.
pub fn is_extended(&self) -> bool
Trait Implementations§
source§impl Ord for Id
impl Ord for Id
source§impl PartialOrd for Id
impl PartialOrd for Id
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for Id
impl Eq for Id
impl StructuralPartialEq for Id
Auto Trait Implementations§
impl Freeze for Id
impl RefUnwindSafe for Id
impl Send for Id
impl Sync for Id
impl Unpin for Id
impl UnwindSafe for Id
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)