Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

ReversibleBytes

Implies that there is an underlying byte order for type T that can be reversed

Fully qualified path: alexandria_bytes::reversible::ReversibleBytes

pub trait ReversibleBytes<T>

Trait functions

reverse_bytes

Reverses the byte order or endianness of self. For example, the word 0x1122_u16 is reversed into 0x2211_u16.

Returns

  • T - returns the byte reversal of self into the same type T

Fully qualified path: alexandria_bytes::reversible::ReversibleBytes::reverse_bytes

fn reverse_bytes(self: @T) -> T