[][src]Trait bitintr::Rev

pub trait Rev {
    fn rev(self) -> Self;
}

Byte reverse

Required methods

fn rev(self) -> Self

Reverse the order of the bytes.

Keywords: count leading sign bits, count leading ones, count leading bits set.

Instructions

  • [REV](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc. ddi0419c/index.html):
    • Description: Reverses the byte order in a register.
    • Architecture: ARMv6, ARMv7, ARMv8.
    • Registers: 32 (v6, v7)/64 (v8) bits.

Example

let n = 0b1111_1111_1100_1010u16;
let m = 0b1100_1010_1111_1111u16;

assert_eq!(n.rev(), m);
assert_eq!(m.rev(), n);
Loading content...

Implementors

impl Rev for i8[src]

impl Rev for i16[src]

impl Rev for i32[src]

impl Rev for i64[src]

impl Rev for u8[src]

impl Rev for u16[src]

impl Rev for u32[src]

impl Rev for u64[src]

Loading content...