pub struct CompositeKey { /* private fields */ }Expand description
Composite key builder for complex keys
Implementations§
Source§impl CompositeKey
impl CompositeKey
Sourcepub fn new() -> CompositeKey
pub fn new() -> CompositeKey
Create a new composite key builder
Sourcepub fn with_namespace(self, ns: impl Into<String>) -> CompositeKey
pub fn with_namespace(self, ns: impl Into<String>) -> CompositeKey
Set the namespace
Sourcepub fn part(self, part: impl Display) -> CompositeKey
pub fn part(self, part: impl Display) -> CompositeKey
Add a part to the key
Sourcepub fn parts<I, S>(self, parts: I) -> CompositeKeywhere
I: IntoIterator<Item = S>,
S: Display,
pub fn parts<I, S>(self, parts: I) -> CompositeKeywhere
I: IntoIterator<Item = S>,
S: Display,
Add multiple parts
Sourcepub fn get_namespace(&self) -> Option<&str>
pub fn get_namespace(&self) -> Option<&str>
Get the namespace
Trait Implementations§
Source§impl CacheKey for CompositeKey
impl CacheKey for CompositeKey
Source§impl Clone for CompositeKey
impl Clone for CompositeKey
Source§fn clone(&self) -> CompositeKey
fn clone(&self) -> CompositeKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompositeKey
impl Debug for CompositeKey
Source§impl Default for CompositeKey
impl Default for CompositeKey
Source§fn default() -> CompositeKey
fn default() -> CompositeKey
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CompositeKey
impl RefUnwindSafe for CompositeKey
impl Send for CompositeKey
impl Sync for CompositeKey
impl Unpin for CompositeKey
impl UnwindSafe for CompositeKey
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