Function bitwise::word::set_bits_geq [] [src]

pub fn set_bits_geq<T: Word, U: UnsignedWord>(x: T, bit: U) -> T

Sets all bits of x at position >= bit.

Panics

If bit >= bit_size().

Examples

use bitwise::word::*;

let n = 0b1000_0010u8;
let s = 0b1110_0010u8;
assert_eq!(n.set_bits_geq(5u8), s);
assert_eq!(set_bits_geq(n, 5u8), s);