Skip to main content

RawField

Trait RawField 

Source
pub trait RawField: Clone {
    // Required methods
    fn mask() -> u32;
    fn shift() -> usize;
    fn bitsize() -> usize;

    // Provided methods
    fn decode(raw: u32) -> Self
       where Self: TryFrom<u32>,
             <Self as TryFrom<u32>>::Error: Debug { ... }
    fn encode(&self) -> u32
       where Self: Into<u32> { ... }
}

Required Methods§

Provided Methods§

Source

fn decode(raw: u32) -> Self
where Self: TryFrom<u32>, <Self as TryFrom<u32>>::Error: Debug,

Source

fn encode(&self) -> u32
where Self: Into<u32>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§