Struct canadensis_filter_config::Filter
source · [−]pub struct Filter { /* private fields */ }
Expand description
A generic mask-based filter for extended CAN IDs
A filter will accept a message if (message_id & filter.mask) == (filter.id & filter.mask).
Implementations
sourceimpl Filter
impl Filter
sourcepub fn new(mask: u32, id: u32) -> Self
pub fn new(mask: u32, id: u32) -> Self
Creates a filter
If the mask or ID is too large to fit into 29 bits, it will be silently truncated.
sourcepub fn exact_match(id: u32) -> Self
pub fn exact_match(id: u32) -> Self
Creates a filter that matches exactly one message ID
If the ID is too larg to fit into 29 bits, it will be silently truncated.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl UnwindSafe for Filter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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