pub struct Namespace(/* private fields */);Expand description
A validated CONIKS namespace — the per-tenant domain separator.
A namespace is a single non-empty segment of printable ASCII excluding /
(so it slots cleanly into the <namespace>/<record-type>/v<N> context-label
grammar shared with crate::leaf::ContextLabel). Distinct namespaces get
independent VRF inputs and tree/commitment hashes, so their directories and
proofs are fully isolated.
Implementations§
Source§impl Namespace
impl Namespace
Sourcepub fn parse(namespace: &str) -> Result<Self>
pub fn parse(namespace: &str) -> Result<Self>
Parse and validate a namespace segment.
§Errors
Returns Error::MalformedNamespace if it is empty or contains a byte
outside printable ASCII, or a /.
Sourcepub fn commitment_label(&self) -> String
pub fn commitment_label(&self) -> String
The per-namespace commitment context label, <ns>/coniks-commitment/v1.
Trait Implementations§
impl Eq for Namespace
impl StructuralPartialEq for Namespace
Auto Trait Implementations§
impl Freeze for Namespace
impl RefUnwindSafe for Namespace
impl Send for Namespace
impl Sync for Namespace
impl Unpin for Namespace
impl UnsafeUnpin for Namespace
impl UnwindSafe for Namespace
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