pub struct Mask32 { /* private fields */ }
Expand description
A 32-bit identifier mask.
Implementations§
Source§impl Mask32
impl Mask32
Sourcepub fn accept_all() -> Self
pub fn accept_all() -> Self
Creates a 32-bit identifier mask that accepts all frames.
This will accept both standard and extended data and remote frames with any ID.
Sourcepub fn frames_with_ext_id(id: ExtendedId, mask: ExtendedId) -> Self
pub fn frames_with_ext_id(id: ExtendedId, mask: ExtendedId) -> Self
Creates a 32-bit identifier mask that accepts all frames with the given extended ID and mask combination.
Filter logic: frame_accepted = (incoming_id & mask) == (id & mask)
A mask of all all ones (0x1FFF_FFFF
) matches an exact ID, a mask of 0 matches all IDs.
Both data and remote frames with id
will be accepted. Standard frames will be rejected.
Sourcepub fn frames_with_std_id(id: StandardId, mask: StandardId) -> Self
pub fn frames_with_std_id(id: StandardId, mask: StandardId) -> Self
Creates a 32-bit identifier mask that accepts all frames with the given standard ID and mask combination.
Filter logic: frame_accepted = (incoming_id & mask) == (id & mask)
A mask of all all ones (0x7FF
) matches the exact ID, a mask of 0 matches all IDs.
Both data and remote frames with id
will be accepted. Extended frames will be rejected.
Sourcepub fn data_frames_only(&mut self) -> &mut Self
pub fn data_frames_only(&mut self) -> &mut Self
Make the filter accept data frames only.
Sourcepub fn remote_frames_only(&mut self) -> &mut Self
pub fn remote_frames_only(&mut self) -> &mut Self
Make the filter accept remote frames only.
Trait Implementations§
Source§impl From<Mask32> for BankConfig
impl From<Mask32> for BankConfig
impl Copy for Mask32
Auto Trait Implementations§
impl Freeze for Mask32
impl RefUnwindSafe for Mask32
impl Send for Mask32
impl Sync for Mask32
impl Unpin for Mask32
impl UnwindSafe for Mask32
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)