[][src]Struct kernel::common::registers::Field

pub struct Field<T, R> where
    R: RegisterLongName,
    T: IntLike
{ pub mask: T, pub shift: usize, associated_register: PhantomData<R>, }

Specific section of a register.

Fields

mask: Tshift: usizeassociated_register: PhantomData<R>

Methods

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

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

pub fn val(&self, value: u8) -> FieldValue<u8, R>[src]

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

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

pub fn val(&self, value: u16) -> FieldValue<u16, R>[src]

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

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

pub fn val(&self, value: u32) -> FieldValue<u32, R>[src]

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

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

pub fn val(&self, value: u64) -> FieldValue<u64, R>[src]

Trait Implementations

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

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

Auto Trait Implementations

impl<T, R> Unpin for Field<T, R> where
    R: Unpin,
    T: Unpin

impl<T, R> Send for Field<T, R> where
    R: Send,
    T: Send

impl<T, R> Sync for Field<T, R> where
    R: Sync,
    T: Sync

Blanket Implementations

impl<T> From<T> for 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> Into<U> for T where
    U: From<T>, 
[src]

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.

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

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

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