Struct lockchain_core::MetaDomain [−][src]
pub struct MetaDomain { /* fields omitted */ }
A metadomain is a simplified version of a cleartext record.
It is not encoded in special ways, it is not used in any way
for secret information. All data inside a metadata file
(for example, living inside the metadata
folder of a vault)
is public to all.
It can be used for things that need to be stored in encrypted form where the encryption key is never present. Or for simple authentication verification such as:
- User registry
- Per-user encrypted primary keys
- Usage statistics shared between clients
It implements a series of traits which means it's possible to easily interact with to store data.
Methods
impl MetaDomain
[src]
impl MetaDomain
pub fn new<S>(name: S) -> Self where
S: Into<String>,
[src]
pub fn new<S>(name: S) -> Self where
S: Into<String>,
Create a new domain space struct
pub fn name(&self) -> &str
[src]
pub fn name(&self) -> &str
Return the domain name for easy comparison
pub fn size(&self) -> usize
[src]
pub fn size(&self) -> usize
Get the number of items in this domain
Trait Implementations
impl Debug for MetaDomain
[src]
impl Debug for MetaDomain
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl AutoEncoder for MetaDomain
[src]
impl AutoEncoder for MetaDomain
fn encode(&self) -> Result<String, SerdeError>
[src]
fn encode(&self) -> Result<String, SerdeError>
fn decode(s: &str) -> Result<Self, SerdeError>
[src]
fn decode(s: &str) -> Result<Self, SerdeError>
impl Body for MetaDomain
[src]
impl Body for MetaDomain
Auto Trait Implementations
impl Send for MetaDomain
impl Send for MetaDomain
impl Sync for MetaDomain
impl Sync for MetaDomain