Trait IntoRaw

Source
pub trait IntoRaw<Raw, Target> {
    // Required method
    fn into_raw(target: Target) -> Raw;
}

Required Methods§

Source

fn into_raw(target: Target) -> Raw

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§

Source§

impl<T, Raw, Target> IntoRaw<Raw, Target> for T
where Target: Into<Raw>,

Blanket impl of IntoRaw for any type that has Into implemented. This allows types that have universal conversions to define Into rather than a conversion per bitfield. If the Target type does not have a universal representation (i.e. it varies depending on the bitstruct) you should instead implement IntoRaw for each particular bitstruct field that contains the Target type.