Trait overflower_support::ShlSaturate [] [src]

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

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

This does the same as the std::ops::Shl 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 left, return 0 if the number of bits shifted are higher than the width of the type

Implementors