pub struct StoredValue {
pub bytes: ValueBytes,
pub metadata: ValueMetadata,
}Expand description
A serialised value and its metadata.
Fields§
§bytes: ValueBytesSerialised value bytes.
metadata: ValueMetadataStored value metadata.
Implementations§
Source§impl StoredValue
impl StoredValue
Sourcepub fn new(bytes: ValueBytes, metadata: ValueMetadata) -> Self
pub fn new(bytes: ValueBytes, metadata: ValueMetadata) -> Self
Creates a stored value.
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Returns true when the value has expired at the current time.
Trait Implementations§
Source§impl Clone for StoredValue
impl Clone for StoredValue
Source§fn clone(&self) -> StoredValue
fn clone(&self) -> StoredValue
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 Debug for StoredValue
impl Debug for StoredValue
impl Eq for StoredValue
Source§impl PartialEq for StoredValue
impl PartialEq for StoredValue
Source§fn eq(&self, other: &StoredValue) -> bool
fn eq(&self, other: &StoredValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StoredValue
Auto Trait Implementations§
impl !Freeze for StoredValue
impl RefUnwindSafe for StoredValue
impl Send for StoredValue
impl Sync for StoredValue
impl Unpin for StoredValue
impl UnsafeUnpin for StoredValue
impl UnwindSafe for StoredValue
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