pub struct NamespacePrefix { /* private fields */ }Expand description
Hierarchical prefix used by crate::Store::list_namespaces.
Matches every Namespace whose tenant matches tenant_id and
whose scope segments start with the prefix’s segments. An empty
scope matches every namespace under tenant_id. The shape
mirrors Namespace so callers compose the two consistently —
the tenant boundary is enforced for namespace listings just like
it is for individual entries (Invariant 11 / F2).
Implementations§
Source§impl NamespacePrefix
impl NamespacePrefix
Sourcepub const fn new(tenant_id: TenantId) -> Self
pub const fn new(tenant_id: TenantId) -> Self
Build a prefix matching every namespace under tenant_id.
Append scope segments via Self::with_scope to narrow.
The TenantId argument has already passed its validating
constructor — invariant 11 cannot be bypassed via the
listing surface.
Sourcepub fn with_scope(self, segment: impl Into<String>) -> Self
pub fn with_scope(self, segment: impl Into<String>) -> Self
Append one scope segment. Builder-style.
Trait Implementations§
Source§impl Clone for NamespacePrefix
impl Clone for NamespacePrefix
Source§fn clone(&self) -> NamespacePrefix
fn clone(&self) -> NamespacePrefix
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NamespacePrefix
impl Debug for NamespacePrefix
Source§impl From<&Namespace> for NamespacePrefix
impl From<&Namespace> for NamespacePrefix
Source§impl Hash for NamespacePrefix
impl Hash for NamespacePrefix
Source§impl PartialEq for NamespacePrefix
impl PartialEq for NamespacePrefix
Source§fn eq(&self, other: &NamespacePrefix) -> bool
fn eq(&self, other: &NamespacePrefix) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for NamespacePrefix
impl StructuralPartialEq for NamespacePrefix
Auto Trait Implementations§
impl Freeze for NamespacePrefix
impl RefUnwindSafe for NamespacePrefix
impl Send for NamespacePrefix
impl Sync for NamespacePrefix
impl Unpin for NamespacePrefix
impl UnsafeUnpin for NamespacePrefix
impl UnwindSafe for NamespacePrefix
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.