pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica
.
Implementations§
Source§impl Record
impl Record
Sourcepub fn empty_current() -> Self
pub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
Sourcepub fn new_current(hash: Hash, len: u64) -> Self
pub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record
with the timestamp set to now.
Sourcepub fn content_len(&self) -> u64
pub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
Sourcepub fn content_hash(&self) -> Hash
pub fn content_hash(&self) -> Hash
Get the [struct@Hash
] of the content data of this record.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Record
impl<'de> Deserialize<'de> for Record
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 Record
impl Ord for Record
Ordering for entry values.
Compares first the timestamp, then the content hash.
Source§impl PartialOrd for Record
impl PartialOrd for Record
impl Eq for Record
impl StructuralPartialEq for Record
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more