pub trait Id {
type BaseId;
type ExtendedId;
// Required methods
fn base_id(&self) -> Option<Self::BaseId>;
fn extended_id(&self) -> Option<Self::ExtendedId>;
}
Expand description
A type that can either be BaseId
or ExtendedId
Required Associated Types§
Sourcetype ExtendedId
type ExtendedId
The (29-bit) ExtendedId variant.
Required Methods§
Sourcefn base_id(&self) -> Option<Self::BaseId>
fn base_id(&self) -> Option<Self::BaseId>
Returns Some(base_id)
if this Can-ID is 11-bit.
Returns None
if this Can-ID is 29-bit.
Sourcefn extended_id(&self) -> Option<Self::ExtendedId>
fn extended_id(&self) -> Option<Self::ExtendedId>
Returns Some(extended_id)
if this Can-ID is 29-bit.
Returns None
if this Can-ID is 11-bit.