pub struct Id(pub u64);Tuple Fields§
§0: u64Implementations§
Source§impl Id
impl Id
pub const MAX: Self
pub const MIN: Self
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.
Sourcepub fn is_virtual(self) -> bool
pub fn is_virtual(self) -> bool
Test if this Id is in the VIRTUAL group.
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 for Id
impl PartialOrd for Id
impl Copy for Id
impl Eq for Id
impl StructuralPartialEq for Id
Auto Trait Implementations§
impl Freeze for Id
impl RefUnwindSafe for Id
impl Send for Id
impl Sync for Id
impl Unpin for Id
impl UnsafeUnpin for Id
impl UnwindSafe for Id
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more