Trait aint::BitConcat

source ·
pub trait BitConcat<L, R>: Sized {
    // Required method
    fn bit_concat(left: L, right: R) -> Self;
}
Expand description

Concatenate two integral types bitwise into a larger integral type.

Example:

let concat = u16::bit_concat(0b10101010u8, 0b01010101u8);
assert_eq!(concat, 0b10101010_01010101_u16);

Required Methods§

source

fn bit_concat(left: L, right: R) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Int, L, R> BitConcat<L, R> for T
where <L::Width as Width>::Add<R::Width>: WidthEq<T::Width>, L: WrappingInto<T> + Int, R: WrappingInto<T> + Int,