[][src]Struct memflow::mem::cache::timed_validator::TimedCacheValidator

pub struct TimedCacheValidator { /* fields omitted */ }

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]

impl Clone for TimedCacheValidator[src]

impl Default for TimedCacheValidator[src]

Creates a validator with a cache timeout of 1 second.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.