pub struct FnExtractor<T> { /* private fields */ }Expand description
Generic extractor that uses KeyExtract trait to generate cache keys.
This extractor bridges the simple KeyExtract trait to hitbox’s Extractor trait,
adding the function path as a prefix to ensure different functions have different cache keys.
§Example
ⓘ
use hitbox_fn::{Args, FnExtractor};
let extractor = FnExtractor::<Args<(UserId, TenantId)>>::new("my_module::fetch_user");Implementations§
Trait Implementations§
Source§impl<T> Extractor for FnExtractor<T>
impl<T> Extractor for FnExtractor<T>
Auto Trait Implementations§
impl<T> Freeze for FnExtractor<T>
impl<T> RefUnwindSafe for FnExtractor<T>where
T: RefUnwindSafe,
impl<T> Send for FnExtractor<T>where
T: Send,
impl<T> Sync for FnExtractor<T>where
T: Sync,
impl<T> Unpin for FnExtractor<T>where
T: Unpin,
impl<T> UnsafeUnpin for FnExtractor<T>
impl<T> UnwindSafe for FnExtractor<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