Struct socketcan_isotp::StandardId
source · [−]pub struct StandardId(_);Expand description
Standard 11-bit CAN Identifier (0..=0x7FF).
Implementations
sourceimpl StandardId
impl StandardId
sourcepub const ZERO: StandardId = Self(0)
pub const ZERO: StandardId = Self(0)
CAN ID 0, the highest priority.
sourcepub const MAX: StandardId = Self(2047)
pub const MAX: StandardId = Self(2047)
CAN ID 0x7FF, the lowest priority.
sourcepub const fn new(raw: u16) -> Option<StandardId>
pub const fn new(raw: u16) -> Option<StandardId>
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) -> StandardId
pub const unsafe fn new_unchecked(raw: u16) -> StandardId
Creates a new StandardId without checking if it is inside the valid range.
Trait Implementations
sourceimpl Clone for StandardId
impl Clone for StandardId
sourcefn clone(&self) -> StandardId
fn clone(&self) -> StandardId
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 StandardId
impl Debug for StandardId
sourceimpl From<StandardId> for Id
impl From<StandardId> for Id
sourcefn from(id: StandardId) -> Id
fn from(id: StandardId) -> Id
Converts to this type from the input type.
sourceimpl PartialEq<StandardId> for StandardId
impl PartialEq<StandardId> for StandardId
sourcefn eq(&self, other: &StandardId) -> bool
fn eq(&self, other: &StandardId) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &StandardId) -> bool
fn ne(&self, other: &StandardId) -> bool
This method tests for !=.
impl Copy for StandardId
impl Eq for StandardId
impl StructuralEq for StandardId
impl StructuralPartialEq for StandardId
Auto Trait Implementations
impl RefUnwindSafe for StandardId
impl Send for StandardId
impl Sync for StandardId
impl Unpin for StandardId
impl UnwindSafe for StandardId
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)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more