pub trait FunnelShr: Sized {
type Output;
// Required method
fn funnel_shr(self, rhs: Self, n: u32) -> Self::Output;
}Expand description
Performs a funnel right shift on a double-width value formed from two words.
Required Associated Types§
Sourcetype Output
type Output
Funnel shift right: concatenates self (high word) with rhs (low
word), shifts the combination right by n, and returns the low word
— i.e. (rhs >> n) | (self << (BITS - n)). Like std, this is only
provided for unsigned types.
§Panics
Panics if n >= BITS.
use const_num_traits::FunnelShr;
assert_eq!(FunnelShr::funnel_shr(0x01u8, 0x80, 1), 0xC0);Required Methods§
fn funnel_shr(self, rhs: Self, n: u32) -> Self::Output
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".