pub struct DistributedEntry<V> {
pub value: V,
pub created_ticks: i64,
pub logical_expiration_ticks: i64,
pub physical_expiration_ticks: i64,
pub is_from_fail_safe: bool,
pub etag: Option<String>,
pub last_modified_ticks: Option<i64>,
pub tags: Vec<String>,
}Expand description
The serializable L2 envelope: a value together with the metadata required to rebuild its freshness/fail-safe state on any node.
Fields§
§value: VThe cached value.
created_ticks: i64Creation tick (for tag-marker comparison).
logical_expiration_ticks: i64Logical-expiration tick.
physical_expiration_ticks: i64Physical-expiration tick (fail-safe boundary).
is_from_fail_safe: boolWhether the value came from a fail-safe activation.
etag: Option<String>Optional ETag for conditional refresh.
last_modified_ticks: Option<i64>Optional LastModified tick for conditional refresh.
The tags attached to the entry.
Implementations§
Source§impl<V: Clone> DistributedEntry<V>
impl<V: Clone> DistributedEntry<V>
Sourcepub fn from_entry(entry: &Entry<V>) -> Self
pub fn from_entry(entry: &Entry<V>) -> Self
Captures an in-memory Entry as a wire envelope.
Sourcepub fn into_entry(self, now: Timestamp) -> Entry<V>
pub fn into_entry(self, now: Timestamp) -> Entry<V>
Rebuilds an in-memory Entry from the wire envelope, relative to now.
Trait Implementations§
Source§impl<V: Clone> Clone for DistributedEntry<V>
impl<V: Clone> Clone for DistributedEntry<V>
Source§fn clone(&self) -> DistributedEntry<V>
fn clone(&self) -> DistributedEntry<V>
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 moreSource§impl<V: Debug> Debug for DistributedEntry<V>
impl<V: Debug> Debug for DistributedEntry<V>
Source§impl<'de, V> Deserialize<'de> for DistributedEntry<V>where
V: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for DistributedEntry<V>where
V: Deserialize<'de>,
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
Auto Trait Implementations§
impl<V> Freeze for DistributedEntry<V>where
V: Freeze,
impl<V> RefUnwindSafe for DistributedEntry<V>where
V: RefUnwindSafe,
impl<V> Send for DistributedEntry<V>where
V: Send,
impl<V> Sync for DistributedEntry<V>where
V: Sync,
impl<V> Unpin for DistributedEntry<V>where
V: Unpin,
impl<V> UnsafeUnpin for DistributedEntry<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for DistributedEntry<V>where
V: UnwindSafe,
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