[−][src]Trait cjdns_core::LabelBits
Describes types which can act as routing label's underlying data type.
Routing labels itself are opaque, so this trait is required for internal data manipulations.
The following parent traits of LabelBits
are considered public: Sized
, Copy
, From<u32>
, Eq
, Display
.
For label manipulation routines please see the cjdns-splice crate.
This trait is implemented for u64
and u128
.
Associated Constants
const ZERO: Self
Zero value for this data type.
const ONE: Self
One (1) value for this data type.
const BIT_SIZE: u32
Bit size of the this data type.
const MAX_PAYLOAD_BITS: u32
Maximum number of bits a label payload can occupy.
Required methods
fn highest_set_bit(&self) -> Option<u32>
Index of highest set bit in binary representation.