Struct socketcan_isotp::ExtendedId
source · [−]pub struct ExtendedId(_);Expand description
Extended 29-bit CAN Identifier (0..=1FFF_FFFF).
Implementations
sourceimpl ExtendedId
impl ExtendedId
sourcepub const ZERO: ExtendedId = Self(0)
pub const ZERO: ExtendedId = Self(0)
CAN ID 0, the highest priority.
sourcepub const MAX: ExtendedId = Self(536870911)
pub const MAX: ExtendedId = Self(536870911)
CAN ID 0x1FFFFFFF, the lowest priority.
sourcepub const fn new(raw: u32) -> Option<ExtendedId>
pub const fn new(raw: u32) -> Option<ExtendedId>
Tries to create a ExtendedId from a raw 32-bit integer.
This will return None if raw is out of range of an 29-bit integer (> 0x1FFF_FFFF).
sourcepub const unsafe fn new_unchecked(raw: u32) -> ExtendedId
pub const unsafe fn new_unchecked(raw: u32) -> ExtendedId
Creates a new ExtendedId without checking if it is inside the valid range.
sourcepub fn standard_id(&self) -> StandardId
pub fn standard_id(&self) -> StandardId
Returns the Base ID part of this extended identifier.
Trait Implementations
sourceimpl Clone for ExtendedId
impl Clone for ExtendedId
sourcefn clone(&self) -> ExtendedId
fn clone(&self) -> ExtendedId
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ExtendedId
impl Debug for ExtendedId
sourceimpl From<ExtendedId> for Id
impl From<ExtendedId> for Id
sourcefn from(id: ExtendedId) -> Id
fn from(id: ExtendedId) -> Id
Converts to this type from the input type.
sourceimpl PartialEq<ExtendedId> for ExtendedId
impl PartialEq<ExtendedId> for ExtendedId
sourcefn eq(&self, other: &ExtendedId) -> bool
fn eq(&self, other: &ExtendedId) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &ExtendedId) -> bool
fn ne(&self, other: &ExtendedId) -> bool
This method tests for !=.
impl Copy for ExtendedId
impl Eq for ExtendedId
impl StructuralEq for ExtendedId
impl StructuralPartialEq for ExtendedId
Auto Trait Implementations
impl RefUnwindSafe for ExtendedId
impl Send for ExtendedId
impl Sync for ExtendedId
impl Unpin for ExtendedId
impl UnwindSafe for ExtendedId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more