pub struct Id(pub u64);
Tuple Fields§
§0: u64
Implementations§
source§impl Id
impl Id
sourcepub fn to_bytearray(self) -> [u8; 8]
pub fn to_bytearray(self) -> [u8; 8]
Convert to a byte array. Useful for indexedlog range query.
sourcepub fn to_prefixed_bytearray(self, prefix: u8) -> [u8; 9]
pub fn to_prefixed_bytearray(self, prefix: u8) -> [u8; 9]
Similar to to_bytearray
, but insert a prefix
at the head.
Useful for segment queries where level
is the prefix
.
pub const MAX: Self = _
pub const MIN: Self = _
Trait Implementations§
source§impl<'de> Deserialize<'de> for Id
impl<'de> Deserialize<'de> for Id
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Id
impl Ord for Id
source§impl PartialOrd<Id> for Id
impl PartialOrd<Id> for Id
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more