[][src]Trait bounded_registers::Positioned

pub trait Positioned {
    type Width;
    fn mask(&self) -> Self::Width;
fn in_position(&self) -> Self::Width; }

Positioned is a trait which is used to represent a value, be it a Field or simply a u32, as its value were it to be in position in its register.

It comes into play in Register::modify where, in the case of a use like Field1 + Field2 + Field3, it is simply a no-op; as the + implementation already positions the field. On the other hand, when simply passing one Field, in_position will shift the Field's value right by O.

Associated Types

type Width

Loading content...

Required methods

fn mask(&self) -> Self::Width

fn in_position(&self) -> Self::Width

Loading content...

Implementors

impl<W, M: Unsigned, O: Unsigned, U: Unsigned, R> Positioned for Field<W, M, O, U, R> where
    U: IsGreater<U0, Output = True> + ReifyTo<W>,
    W: Copy + Clone + PartialOrd + BitAnd<W, Output = W> + Shr<W, Output = W> + Default + Shl<W, Output = W>,
    M: ReifyTo<W>,
    U0: ReifyTo<W>,
    O: ReifyTo<W>, 
[src]

type Width = W

fn mask(&self) -> W[src]

The mask for this positioned value.

fn in_position(&self) -> W[src]

Presents a value as its register-relative value.

impl<W: Copy> Positioned for FieldDisj<W>[src]

type Width = W

Loading content...