Struct embedded_can::StandardId
source · pub struct StandardId(/* private fields */);
Expand description
Standard 11-bit CAN Identifier (0..=0x7FF
).
Implementations§
source§impl StandardId
impl StandardId
sourcepub const fn new(raw: u16) -> Option<Self>
pub const fn new(raw: u16) -> Option<Self>
Tries to create a StandardId
from a raw 16-bit integer.
This will return None
if raw
is out of range of an 11-bit integer (> 0x7FF
).
sourcepub const unsafe fn new_unchecked(raw: u16) -> Self
pub const unsafe fn new_unchecked(raw: u16) -> Self
Creates a new StandardId
without checking if it is inside the valid range.
§Safety
Using this method can create an invalid ID and is thus marked as unsafe.
Trait Implementations§
source§impl Clone for StandardId
impl Clone for StandardId
source§fn clone(&self) -> StandardId
fn clone(&self) -> StandardId
Returns a copy of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StandardId
impl Debug for StandardId
source§impl From<StandardId> for Id
impl From<StandardId> for Id
source§fn from(id: StandardId) -> Self
fn from(id: StandardId) -> Self
Converts to this type from the input type.
source§impl Hash for StandardId
impl Hash for StandardId
source§impl Ord for StandardId
impl Ord for StandardId
source§impl PartialEq for StandardId
impl PartialEq for StandardId
source§impl PartialOrd for StandardId
impl PartialOrd for StandardId
impl Copy for StandardId
impl Eq for StandardId
impl StructuralPartialEq for StandardId
Auto Trait Implementations§
impl Freeze for StandardId
impl RefUnwindSafe for StandardId
impl Send for StandardId
impl Sync for StandardId
impl Unpin for StandardId
impl UnwindSafe for StandardId
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
)§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
§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
)