Skip to main content

Cache

Trait Cache 

Source
pub trait Cache: FileSource {
    // Required method
    fn put(&self, resource: &Resource, response: &Response);
}
Expand description

A cache that a Loader reads before the network, and stores the network’s responses in.

Required Methods§

Source

fn put(&self, resource: &Resource, response: &Response)

Stores a response to resource, unless the resource is volatile.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<E: 'static> Cache for DatabaseFileSource<E>