Struct stm32f407g_disc::hal::can::ExtendedId
source · pub struct ExtendedId(_);
Expand description
Extended 29-bit CAN Identifier (0..=1FFF_FFFF
).
Implementations§
source§impl ExtendedId
impl ExtendedId
sourcepub const ZERO: ExtendedId = ExtendedId(0)
pub const ZERO: ExtendedId = ExtendedId(0)
CAN ID 0
, the highest priority.
sourcepub const MAX: ExtendedId = ExtendedId(536870911)
pub const MAX: ExtendedId = ExtendedId(536870911)
CAN ID 0x1FFFFFFF
, the lowest priority.
sourcepub fn new(raw: u32) -> Option<ExtendedId>
pub 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.
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§
source§impl Clone for ExtendedId
impl Clone for ExtendedId
source§fn clone(&self) -> ExtendedId
fn clone(&self) -> ExtendedId
Returns a copy 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 ExtendedId
impl Debug for ExtendedId
source§impl From<ExtendedId> for Id
impl From<ExtendedId> for Id
source§fn from(id: ExtendedId) -> Id
fn from(id: ExtendedId) -> Id
Converts to this type from the input type.