RequestCacheKey
123456789101112131415pub 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;}An extension trait for Requests that adds methods for controlling cache keys.
Stability
This is part of an experimental API that is subject to change or removal even in minor versions of this crate.
Methods
set_cache_key
View sourcefn 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.
Parameters
- self: &mut Self
- key: [u8; 32]
set_cache_key_fn
View sourceSee 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.
Parameters
set_cache_key_str
View sourceSee 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.
Parameters
- self: &mut Self
- key_str: impl AsRef<[u8]>
with_cache_key
View sourcefn with_cache_key(self, key: [u8; 32]) -> SelfSee 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.
Parameters
- self: Self
- key: [u8; 32]
Returns
with_cache_key_fn
View sourceSee 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.
Parameters
Returns
with_cache_key_str
View sourceSee 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.
Parameters
- self: Self
- key_str: impl AsRef<[u8]>
Returns