[][src]Trait slipstream::mask::Mask

pub trait Mask: Copy + Eq + Send + Sync + Sealed + Not + BitAnd + BitAndAssign + BitOr + BitOrAssign + BitXor + BitXorAssign + 'static {
    const TRUE: Self;
    const FALSE: Self;
    fn bool(self) -> bool { ... }
fn from_bool(v: bool) -> Self { ... } }

The trait implemented by all the mask types.

Note that this trait is not implementable by downstream crates, as code in the crate assumes (and relies for safety on the assumption) that the type can ever hold only the two values.

See the module documentation.

Associated Constants

const TRUE: Self

A constant specifying the true value of the type.

For bool, this is true. For the others, this means all bits set to 1 ‒ eg. 256 for `m8.

const FALSE: Self

The false value of the type.

For bool, this is false. For the others, this means 0 (all bits set to 0).

Loading content...

Provided methods

fn bool(self) -> bool

Converts the type to bool.

fn from_bool(v: bool) -> Self

Converts the type from bool.

Loading content...

Implementors

impl Mask for m128[src]

impl Mask for m16[src]

impl Mask for m32[src]

impl Mask for m64[src]

impl Mask for m8[src]

impl Mask for msize[src]

impl Mask for bool[src]

Loading content...