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 fill(self, new_body: HashMap<String, Payload>) -> Self
[src]
pub fn fill(self, new_body: HashMap<String, Payload>) -> Self
Return a MetaDomain that is filled with pre-existing data
pub fn all(&self) -> &HashMap<String, Payload>
[src]
pub fn all(&self) -> &HashMap<String, Payload>
Return a read-only reference to the entire body
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 From<MetaDomain> for KeyStore
[src]
impl From<MetaDomain> for KeyStore
fn from(d: MetaDomain) -> Self
[src]
fn from(d: MetaDomain) -> Self
Performs the conversion.
impl From<KeyStore> for MetaDomain
[src]
impl From<KeyStore> for MetaDomain
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 Clone for MetaDomain
[src]
impl Clone for MetaDomain
fn clone(&self) -> MetaDomain
[src]
fn clone(&self) -> MetaDomain
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Eq for MetaDomain
[src]
impl Eq for MetaDomain
impl PartialEq for MetaDomain
[src]
impl PartialEq for MetaDomain
fn eq(&self, other: &MetaDomain) -> bool
[src]
fn eq(&self, other: &MetaDomain) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &MetaDomain) -> bool
[src]
fn ne(&self, other: &MetaDomain) -> bool
This method tests for !=
.
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