[][src]Struct linkcheck::validation::Cache

pub struct Cache { /* fields omitted */ }

A cache used to skip unnecessary network requests.

Implementations

impl Cache[src]

pub fn new() -> Self[src]

Create a new, empty Cache.

pub fn lookup(&self, url: &Url) -> Option<&CacheEntry>[src]

Lookup a particular CacheEntry.

pub fn insert(&mut self, url: Url, entry: CacheEntry)[src]

Add a new CacheEntry to the cache.

pub fn url_is_still_valid(&self, url: &Url, timeout: Duration) -> bool[src]

Ask the Cache whether a particular Url is still okay (i.e. CacheEntry::valid is true).

pub fn iter(&self) -> impl Iterator<Item = (&Url, &CacheEntry)> + '_[src]

Iterate over all known CacheEntries, regardless of whether they are stale or invalid.

pub fn clear(&mut self)[src]

Forget all CacheEntries.

Trait Implementations

impl Clone for Cache[src]

impl Debug for Cache[src]

impl Default for Cache[src]

impl<'de> Deserialize<'de> for Cache[src]

impl Extend<(Url, CacheEntry)> for Cache[src]

impl PartialEq<Cache> for Cache[src]

impl Serialize for Cache[src]

impl StructuralPartialEq for Cache[src]

Auto Trait Implementations

impl RefUnwindSafe for Cache

impl Send for Cache

impl Sync for Cache

impl Unpin for Cache

impl UnwindSafe for Cache

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.