pub struct CacheKeyBuilder;Expand description
Builder for cache keys.
Implementations§
Source§impl CacheKeyBuilder
impl CacheKeyBuilder
Sourcepub fn build<T: CacheEntity>(id: &T::Key) -> String
pub fn build<T: CacheEntity>(id: &T::Key) -> String
Build full cache key from entity type and ID.
Sourcepub fn build_with_prefix(prefix: &str, id: &dyn Display) -> String
pub fn build_with_prefix(prefix: &str, id: &dyn Display) -> String
Build cache key with custom prefix.
Sourcepub fn build_composite(parts: &[&str]) -> String
pub fn build_composite(parts: &[&str]) -> String
Build composite key from multiple parts.
Auto Trait Implementations§
impl Freeze for CacheKeyBuilder
impl RefUnwindSafe for CacheKeyBuilder
impl Send for CacheKeyBuilder
impl Sync for CacheKeyBuilder
impl Unpin for CacheKeyBuilder
impl UnwindSafe for CacheKeyBuilder
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