pub struct Namespace { /* private fields */ }Expand description
Namespace key of a crate::Replica.
Holders of this key can insert new entries into a crate::Replica.
Internally, a Namespace is a SigningKey which is used to sign entries.
Implementations§
source§impl Namespace
impl Namespace
sourcepub fn new<R: CryptoRngCore + ?Sized>(rng: &mut R) -> Self
pub fn new<R: CryptoRngCore + ?Sized>(rng: &mut R) -> Self
Create a new Namespace with a random key.
sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
pub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a Namespace from a byte array.
sourcepub fn public_key(&self) -> NamespacePublicKey
pub fn public_key(&self) -> NamespacePublicKey
Get the NamespacePublicKey for this namespace.
sourcepub fn id(&self) -> NamespaceId
pub fn id(&self) -> NamespaceId
Get the NamespaceId for this namespace.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Namespace
impl<'de> Deserialize<'de> for Namespace
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&Namespace> for NamespacePublicKey
impl From<&Namespace> for NamespacePublicKey
source§impl From<Namespace> for NamespaceId
impl From<Namespace> for NamespaceId
source§impl From<Namespace> for NamespacePublicKey
impl From<Namespace> for NamespacePublicKey
source§impl From<SigningKey> for Namespace
impl From<SigningKey> for Namespace
source§fn from(signing_key: SigningKey) -> Self
fn from(signing_key: SigningKey) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for Namespace
impl Send for Namespace
impl Sync for Namespace
impl Unpin for Namespace
impl UnwindSafe for Namespace
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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