[][src]Trait mju_bits::bitfield::BitFieldTrait

pub trait BitFieldTrait: Sealed {
    type Owner;

    const SHIFT: u32;
    const MASK: u64;
}

Tracks the Owner, shift and mask used by the Storage::* methods to provide access to an owned bit field.

Note: this trait is sealed against implementation outside this crate. This restriction will be lifted once the API has stabilized.

Associated Types

type Owner

The owner, typically a Storage, bound to this bit field

Loading content...

Associated Constants

const SHIFT: u32

The number of bits the field is shifted in the owner

const MASK: u64

The bit mask used to to select or clear the field bits in the owner

Loading content...

Implementors

impl<TOwner, TShift, TMask> BitFieldTrait for BitFieldImpl<TOwner, TShift, TMask> where
    TShift: Unsigned,
    TMask: Unsigned
[src]

Implementation for BitFieldImpl explicitly converts the typenum shift and mask calculations into constants. Forcing the conversion here prevents infinite recursion by the compiler when these values are used by Storage to provide access to the field.

type Owner = TOwner

Loading content...