pub struct CacheRecord {
pub uri: String,
pub data: Bytes,
pub meta: Bytes,
}Expand description
A record in a cache. This is designed to represent values in a simple
key-value store, and so it has minimal fields. The uri field is the
key, and the data field is the value. An extra meta field is included
for additional information that may be useful, like timestamps or other
bits that might not make sense to store in the data field.
Fields§
§uri: StringThe URI of the record
data: BytesThe main data of the record
meta: BytesAny additional metadata
Implementations§
Trait Implementations§
Source§impl Clone for CacheRecord
impl Clone for CacheRecord
Source§fn clone(&self) -> CacheRecord
fn clone(&self) -> CacheRecord
Returns a copy of the value. Read more
1.0.0 · 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 CacheRecord
impl Debug for CacheRecord
Source§impl Default for CacheRecord
impl Default for CacheRecord
Source§fn default() -> CacheRecord
fn default() -> CacheRecord
Returns the “default value” for a type. Read more
Source§impl PartialEq for CacheRecord
impl PartialEq for CacheRecord
impl Eq for CacheRecord
impl StructuralPartialEq for CacheRecord
Auto Trait Implementations§
impl !Freeze for CacheRecord
impl RefUnwindSafe for CacheRecord
impl Send for CacheRecord
impl Sync for CacheRecord
impl Unpin for CacheRecord
impl UnwindSafe for CacheRecord
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)