Trait machine_check::Ext

source ·
pub trait Ext<const X: u32> {
    type Output;

    // Required method
    fn ext(self) -> Self::Output;
}
Expand description

Bitvector extension / narrowing trait.

The amount of bits in the result is given by the generic parameter X. If X is greater than original number of bits, the bitvector is extended according to its type. If X is lesser than original number of bits, the highest bits of bitvector are dropped.

Required Associated Types§

Required Methods§

source

fn ext(self) -> Self::Output

Implementors§

source§

impl<const L: u32, const X: u32> Ext<X> for Signed<L>

§

type Output = Signed<X>

source§

impl<const L: u32, const X: u32> Ext<X> for Unsigned<L>

§

type Output = Unsigned<X>