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> Freeze for Item<V>where
V: Freeze,
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§
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