pub struct StandardId(/* private fields */);Available on crate feature
data-support-can only.Expand description
A standard CAN id.
Implementations§
Source§impl StandardId
impl StandardId
Sourcepub const fn new(value: u16) -> Option<StandardId>
pub const fn new(value: u16) -> Option<StandardId>
Creates a StandardId, returns Some if, and only if, value < 0x800.
Sourcepub const fn new_unwrap(value: u16) -> StandardId
pub const fn new_unwrap(value: u16) -> StandardId
The equivalent of StandardId::new(value).unwrap(), but as a const fn, while unwrap is
not const-compatible.
Trait Implementations§
Source§impl Clone for StandardId
impl Clone for StandardId
Source§fn clone(&self) -> StandardId
fn clone(&self) -> StandardId
Returns a duplicate of the value. Read more
1.0.0 · Source§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<'de> Deserialize<'de> for StandardId
impl<'de> Deserialize<'de> for StandardId
Source§fn deserialize<D>(
deserializer: D,
) -> Result<StandardId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<StandardId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<StandardId> for Id
impl From<StandardId> for Id
Source§fn from(standard: StandardId) -> Id
fn from(standard: StandardId) -> Id
Converts to this type from the input type.
Source§impl From<StandardId> for u16
impl From<StandardId> for u16
Source§fn from(value: StandardId) -> u16
fn from(value: StandardId) -> u16
Converts to this type from the input type.
Source§impl PartialEq for StandardId
impl PartialEq for StandardId
Source§impl Serialize for StandardId
impl Serialize for StandardId
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<u16> for StandardId
impl TryFrom<u16> for StandardId
Source§impl TryFrom<u32> for StandardId
impl TryFrom<u32> 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§
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