pub struct DatabaseId(/* private fields */);Expand description
Unique identifier for a database.
Implementations§
Source§impl DatabaseId
impl DatabaseId
Sourcepub fn log_size(&self) -> usize
pub fn log_size(&self) -> usize
Returns the serialized size.
Always 8 bytes (i64 big-endian). uses variable-length packed encoding; Noxu uses fixed-size i64 for simplicity and consistency.
Sourcepub fn write_to_log(&self, buf: &mut Vec<u8>)
pub fn write_to_log(&self, buf: &mut Vec<u8>)
Writes this DatabaseId to a log buffer.
Sourcepub fn read_from_log(buf: &[u8]) -> Result<Self>
pub fn read_from_log(buf: &[u8]) -> Result<Self>
Reads a DatabaseId from a log buffer.
Trait Implementations§
Source§impl Clone for DatabaseId
impl Clone for DatabaseId
Source§fn clone(&self) -> DatabaseId
fn clone(&self) -> DatabaseId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DatabaseId
Source§impl Debug for DatabaseId
impl Debug for DatabaseId
Source§impl Display for DatabaseId
impl Display for DatabaseId
impl Eq for DatabaseId
Source§impl Hash for DatabaseId
impl Hash for DatabaseId
Source§impl Ord for DatabaseId
impl Ord for DatabaseId
Source§fn cmp(&self, other: &DatabaseId) -> Ordering
fn cmp(&self, other: &DatabaseId) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DatabaseId
impl PartialEq for DatabaseId
Source§fn eq(&self, other: &DatabaseId) -> bool
fn eq(&self, other: &DatabaseId) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for DatabaseId
impl PartialOrd for DatabaseId
impl StructuralPartialEq for DatabaseId
Auto Trait Implementations§
impl Freeze for DatabaseId
impl RefUnwindSafe for DatabaseId
impl Send for DatabaseId
impl Sync for DatabaseId
impl Unpin for DatabaseId
impl UnsafeUnpin for DatabaseId
impl UnwindSafe for DatabaseId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.