[][src]Struct register::FieldValue

pub struct FieldValue<T, R> where
    T: IntLike,
    R: RegisterLongName
{ pub value: T, // some fields omitted }

Values for the specific register fields.

Fields

value: T

Implementations

impl<R> FieldValue<u8, R> where
    R: RegisterLongName
[src]

pub const fn new(mask: u8, shift: usize, value: u8) -> FieldValue<u8, R>[src]

impl<R> FieldValue<u16, R> where
    R: RegisterLongName
[src]

pub const fn new(mask: u16, shift: usize, value: u16) -> FieldValue<u16, R>[src]

impl<R> FieldValue<u32, R> where
    R: RegisterLongName
[src]

pub const fn new(mask: u32, shift: usize, value: u32) -> FieldValue<u32, R>[src]

impl<R> FieldValue<u64, R> where
    R: RegisterLongName
[src]

pub const fn new(mask: u64, shift: usize, value: u64) -> FieldValue<u64, R>[src]

impl<T, R> FieldValue<T, R> where
    T: IntLike,
    R: RegisterLongName
[src]

pub fn mask(self) -> T[src]

Get the raw bitmask represented by this FieldValue.

pub fn read(&self, field: Field<T, R>) -> T[src]

pub fn modify(self, val: T) -> T[src]

Modify fields in a register value

pub fn matches_any(self, val: T) -> bool[src]

Check if any specified parts of a field match

pub fn matches_all(self, val: T) -> bool[src]

Check if all specified parts of a field match

Trait Implementations

impl<T, R> Add<FieldValue<T, R>> for FieldValue<T, R> where
    T: IntLike,
    R: RegisterLongName
[src]

type Output = FieldValue<T, R>

The resulting type after applying the + operator.

impl<T, R> AddAssign<FieldValue<T, R>> for FieldValue<T, R> where
    T: IntLike,
    R: RegisterLongName
[src]

impl<T, R> Clone for FieldValue<T, R> where
    T: IntLike + Clone,
    R: RegisterLongName + Clone
[src]

impl<T, R> Copy for FieldValue<T, R> where
    T: IntLike + Copy,
    R: RegisterLongName + Copy
[src]

Auto Trait Implementations

impl<T, R> Send for FieldValue<T, R> where
    R: Send,
    T: Send
[src]

impl<T, R> Sync for FieldValue<T, R> where
    R: Sync,
    T: Sync
[src]

impl<T, R> Unpin for FieldValue<T, R> where
    R: Unpin,
    T: Unpin
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.