[−][src]Struct memflow::mem::cache::timed_validator::TimedCacheValidator
Validator for limiting the cache time based on a time Instant
Remarks
This validator is only available when being compiled with std
.
When using no_std
you might want to use another validator.
TODO: add other validators here
Implementations
impl TimedCacheValidator
[src]
pub fn new(valid_time: Duration) -> Self
[src]
Creates a new TimedCacheValidator with a customizable Duration.
Examples:
use std::time::Duration; use memflow::mem::TimedCacheValidator; let _ = TimedCacheValidator::new(Duration::from_millis(5000).into());
Trait Implementations
impl CacheValidator for TimedCacheValidator
[src]
fn allocate_slots(&mut self, slot_count: usize)
[src]
fn update_validity(&mut self)
[src]
fn is_slot_valid(&self, slot_id: usize) -> bool
[src]
fn validate_slot(&mut self, slot_id: usize)
[src]
fn invalidate_slot(&mut self, slot_id: usize)
[src]
impl Clone for TimedCacheValidator
[src]
fn clone(&self) -> TimedCacheValidator
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for TimedCacheValidator
[src]
Creates a validator with a cache timeout of 1 second.
Auto Trait Implementations
impl RefUnwindSafe for TimedCacheValidator
impl Send for TimedCacheValidator
impl Sync for TimedCacheValidator
impl Unpin for TimedCacheValidator
impl UnwindSafe for TimedCacheValidator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,