pub struct DualStandardFilter { /* private fields */ }
Expand description

A filter that matches against two standard 11-bit standard ids.

The first filter part can match a packet’s id, rtr bit, and the first byte of the payload. The second filter part can match a packet’s id and rtr bit.

Warning: This is not a perfect filter. Extended ids that match the bit layout of this filter will also be accepted.

Implementations§

Create a filter that matches against two standard 11-bit standard ids.

The first filter part can match a packet’s id, rtr bit, and the first byte of the payload. The second filter part can match a packet’s id and rtr bit.

Examples

A filter that matches any standard id that ends with a 00 or a 11, with any rtr, and with any payload on the first filter.

const FILTER: twai::filter::DualStandardFilter = twai::filter::DualStandardFilter::new(
    b"xxxxxxxxx00",
    b"x",
    b"xxxxxxxx",
    b"xxxxxxxxx11",
    b"x",
);

The masks indicate which bits of the code the filter should match against. Set bits in the mask indicate that the corresponding bit in the code should match.

Trait Implementations§

The type of the filter.
Get the register level representation of the filter.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.