pub struct FileSystemCache { /* private fields */ }Expand description
A simple HttpCache implementation that uses a local directory.
Implementations§
Trait Implementations§
Source§impl Clone for FileSystemCache
impl Clone for FileSystemCache
Source§fn clone(&self) -> FileSystemCache
fn clone(&self) -> FileSystemCache
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl HttpCache for FileSystemCache
impl HttpCache for FileSystemCache
Source§fn policy(
&'static self,
key: CacheKey,
) -> Pin<Box<dyn Future<Output = Option<CachePolicy>> + Send>>
fn policy( &'static self, key: CacheKey, ) -> Pin<Box<dyn Future<Output = Option<CachePolicy>> + Send>>
Get the cache-policy for the given
key.Source§fn set_policy(
&'static self,
key: CacheKey,
policy: CachePolicy,
) -> Pin<Box<dyn Future<Output = bool> + Send>>
fn set_policy( &'static self, key: CacheKey, policy: CachePolicy, ) -> Pin<Box<dyn Future<Output = bool> + Send>>
Replaces the cache-policy for the given
key. Read moreSource§fn body(
&'static self,
key: CacheKey,
) -> Pin<Box<dyn Future<Output = Option<IpcBytes>> + Send>>
fn body( &'static self, key: CacheKey, ) -> Pin<Box<dyn Future<Output = Option<IpcBytes>> + Send>>
Get the cached body for the given
key.Source§fn set(
&'static self,
key: CacheKey,
policy: CachePolicy,
body: IpcBytes,
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn set( &'static self, key: CacheKey, policy: CachePolicy, body: IpcBytes, ) -> Pin<Box<dyn Future<Output = ()> + Send>>
Caches the
policy and body for the given key.Source§fn remove(
&'static self,
key: CacheKey,
) -> Pin<Box<dyn Future<Output = ()> + Send>>
fn remove( &'static self, key: CacheKey, ) -> Pin<Box<dyn Future<Output = ()> + Send>>
Remove cache policy and body for the given
key.Get the Cookie value associated with the
uri. Read moreStore the Set-Cookie value associated with the
uri. Read moreRemove the Cookie value associated with the
uri.Auto Trait Implementations§
impl Freeze for FileSystemCache
impl RefUnwindSafe for FileSystemCache
impl Send for FileSystemCache
impl Sync for FileSystemCache
impl Unpin for FileSystemCache
impl UnwindSafe for FileSystemCache
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more