pub struct Item<V> {
pub val: Option<V>,
pub index: u64,
pub conflict: u64,
pub cost: i64,
pub exp: Time,
}Expand description
Item is the parameter when Cache reject, evict value,
Fields
val: Option<V>the value of the entry
index: u64the index of the entry(created by KeyBuilder)
conflict: u64the conflict of the entry(created by KeyBuilder)
cost: i64the cost when store the entry in Cache.
exp: Timeexp contains the ttl information.
Trait Implementations
impl<V: Copy> Copy for Item<V>
Auto Trait Implementations
impl<V> RefUnwindSafe for Item<V> where
V: RefUnwindSafe,
impl<V> Send for Item<V> where
V: Send,
impl<V> Sync for Item<V> where
V: Sync,
impl<V> Unpin for Item<V> where
V: Unpin,
impl<V> UnwindSafe for Item<V> where
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more