pub trait CachePut {
// Required method
fn cache_defaults() -> &'static CacheMetaDefaults;
// Provided methods
fn cacheable(&self, response: ResponseHeader) -> RespCacheable { ... }
fn trace_header(&mut self, _response: &ResponseHeader) { ... }
}Expand description
The interface to define cache put behavior
Required Methods§
Sourcefn cache_defaults() -> &'static CacheMetaDefaults
fn cache_defaults() -> &'static CacheMetaDefaults
Return the CacheMetaDefaults
Provided Methods§
Sourcefn cacheable(&self, response: ResponseHeader) -> RespCacheable
fn cacheable(&self, response: ResponseHeader) -> RespCacheable
Return whether to cache the asset according to the given response header.
Sourcefn trace_header(&mut self, _response: &ResponseHeader)
fn trace_header(&mut self, _response: &ResponseHeader)
Put interesting things in the span given the parsed response header.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.