pub trait RequestCacheKey {
// Required methods
fn set_cache_key(&mut self, key: [u8; 32]);
fn with_cache_key(self, key: [u8; 32]) -> Self;
fn set_cache_key_fn(
&mut self,
f: impl Fn(&Request) -> [u8; 32] + Send + Sync + 'static,
);
fn with_cache_key_fn(
self,
f: impl Fn(&Request) -> [u8; 32] + Send + Sync + 'static,
) -> Self;
fn set_cache_key_str(&mut self, key_str: impl AsRef<[u8]>);
fn with_cache_key_str(self, key_str: impl AsRef<[u8]>) -> Self;
}
Expand description
Required Methods§
Sourcefn set_cache_key(&mut self, key: [u8; 32])
fn set_cache_key(&mut self, key: [u8; 32])
§Stability
This is part of an experimental API that is subject to change or removal even in minor versions of this crate.
Sourcefn with_cache_key(self, key: [u8; 32]) -> Self
fn with_cache_key(self, key: [u8; 32]) -> Self
See Request::with_cache_key()
.
§Stability
This is part of an experimental API that is subject to change or removal even in minor versions of this crate.
Sourcefn set_cache_key_fn(
&mut self,
f: impl Fn(&Request) -> [u8; 32] + Send + Sync + 'static,
)
fn set_cache_key_fn( &mut self, f: impl Fn(&Request) -> [u8; 32] + Send + Sync + 'static, )
See Request::set_cache_key_fn()
.
§Stability
This is part of an experimental API that is subject to change or removal even in minor versions of this crate.
Sourcefn with_cache_key_fn(
self,
f: impl Fn(&Request) -> [u8; 32] + Send + Sync + 'static,
) -> Self
fn with_cache_key_fn( self, f: impl Fn(&Request) -> [u8; 32] + Send + Sync + 'static, ) -> Self
See Request::with_cache_key_fn()
.
§Stability
This is part of an experimental API that is subject to change or removal even in minor versions of this crate.
Sourcefn set_cache_key_str(&mut self, key_str: impl AsRef<[u8]>)
fn set_cache_key_str(&mut self, key_str: impl AsRef<[u8]>)
See Request::set_cache_key_str()
.
§Stability
This is part of an experimental API that is subject to change or removal even in minor versions of this crate.
Sourcefn with_cache_key_str(self, key_str: impl AsRef<[u8]>) -> Self
fn with_cache_key_str(self, key_str: impl AsRef<[u8]>) -> Self
See Request::with_cache_key_str()
.
§Stability
This is part of an experimental API that is subject to change or removal even in minor versions of this crate.
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.