pub trait FunnelShl: Sized {
type Output;
// Required method
fn funnel_shl(self, rhs: Self, n: u32) -> Self::Output;
}Expand description
Performs a funnel left shift on a double-width value formed from two words.
Required Associated Types§
Sourcetype Output
type Output
Funnel shift left: concatenates self (high word) with rhs (low
word), shifts the combination left by n, and returns the high word
— i.e. (self << n) | (rhs >> (BITS - n)). Like std, this is only
provided for unsigned types.
§Panics
Panics if n >= BITS.
use const_num_traits::FunnelShl;
assert_eq!(FunnelShl::funnel_shl(0x01u8, 0x80, 1), 0x03);Required Methods§
fn funnel_shl(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".