pub struct CommitId(/* private fields */);Expand description
Identifies a commit in the history DAG.
A distinct type from BranchId, so the two cannot be swapped;
persisted exactly like the u64 it wraps. As an ordered collection
key, it uses the same big-endian encoding as u64.
Implementations§
Trait Implementations§
impl Copy for CommitId
Source§impl<'de> Deserialize<'de> for CommitId
impl<'de> Deserialize<'de> for CommitId
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
impl Eq for CommitId
Source§impl KeyEnDeOrdered for CommitId
impl KeyEnDeOrdered for CommitId
Source§fn from_slice(bytes: &[u8]) -> Result<Self>
fn from_slice(bytes: &[u8]) -> Result<Self>
Decodes a key from a byte slice.
Source§fn into_bytes(self) -> RawBytes
fn into_bytes(self) -> RawBytes
Consumes the key and encodes it into a byte vector.
Source§fn from_bytes(b: RawBytes) -> Result<Self>
fn from_bytes(b: RawBytes) -> Result<Self>
Consumes a byte vector and decodes it into a key.
Source§impl Ord for CommitId
impl Ord for CommitId
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for CommitId
impl PartialOrd for CommitId
impl StructuralPartialEq for CommitId
Auto Trait Implementations§
impl Freeze for CommitId
impl RefUnwindSafe for CommitId
impl Send for CommitId
impl Sync for CommitId
impl Unpin for CommitId
impl UnsafeUnpin for CommitId
impl UnwindSafe for CommitId
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> KeyDe for Twhere
T: DeserializeOwned,
impl<T> KeyDe for Twhere
T: DeserializeOwned,
Source§impl<T> KeyEn for Twhere
T: Serialize,
impl<T> KeyEn for Twhere
T: Serialize,
Source§fn try_encode_key(&self) -> Result<Vec<u8>, VsdbError>
fn try_encode_key(&self) -> Result<Vec<u8>, VsdbError>
Attempts to encode the key. Returns
Err only if the
Serialize implementation is broken — see module-level trust
model for details.Source§fn encode_key(&self) -> RawBytes
fn encode_key(&self) -> RawBytes
Encodes the key, panicking on failure. Read more