Trait overflower_support::ShrWrap [] [src]

pub trait ShrWrap<RHS = usize> {
    type Output;
    fn shr_wrap(self, rhs: RHS) -> Self::Output;
}

Shift right, return 0 if the number of bits shifted are higher than the width of the type

This does the same as the std::ops::Shr trait for most types. it is specialized for integer types to return zero on over- or underflow.

Associated Types

the return type of our shift operation

Required Methods

shift right, return 0 if the number of bits shifted are higher than the width of the type

Implementors