Struct embedded_hal::can::ExtendedId
source · [−]pub struct ExtendedId(_);
Expand description
Extended 29-bit CAN Identifier (0..=1FFF_FFFF
).
Implementations
sourceimpl ExtendedId
impl ExtendedId
sourcepub fn new(raw: u32) -> Option<Self>
pub fn new(raw: u32) -> Option<Self>
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) -> Self
pub const unsafe fn new_unchecked(raw: u32) -> Self
Creates a new ExtendedId
without checking if it is inside the valid range.
Safety
Using this method can create an invalid ID and is thus marked as unsafe.
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) -> Self
fn from(id: ExtendedId) -> Self
Performs the conversion.
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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more