pub struct Arg<T> { /* private fields */ }Expand description
Wrapper for function arguments included in cache key extraction.
This type wraps arguments that should contribute to the cache key.
The inner type must implement KeyExtract.
The parameter name is used to disambiguate cache keys:
- Single inner
KeyPart→ key is replaced with the parameter name - Multiple inner
KeyParts→ each key is prefixed with"param_name."
Implementations§
Trait Implementations§
Source§impl<T: KeyExtract> KeyExtract for Arg<T>
impl<T: KeyExtract> KeyExtract for Arg<T>
Auto Trait Implementations§
impl<T> Freeze for Arg<T>where
T: Freeze,
impl<T> RefUnwindSafe for Arg<T>where
T: RefUnwindSafe,
impl<T> Send for Arg<T>where
T: Send,
impl<T> Sync for Arg<T>where
T: Sync,
impl<T> Unpin for Arg<T>where
T: Unpin,
impl<T> UnsafeUnpin for Arg<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Arg<T>where
T: UnwindSafe,
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> CachedFieldClone for Twhere
T: Clone,
impl<T> CachedFieldClone for Twhere
T: Clone,
Source§fn cached_clone(&self) -> T
fn cached_clone(&self) -> T
Clone this field for cache storage.