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 MetaDomainpub 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>) -> SelfReturn 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) -> &strReturn the domain name for easy comparison
pub fn size(&self) -> usize[src]
pub fn size(&self) -> usizeGet the number of items in this domain
Trait Implementations
impl From<MetaDomain> for KeyStore[src]
impl From<MetaDomain> for KeyStorefn from(d: MetaDomain) -> Self[src]
fn from(d: MetaDomain) -> SelfPerforms the conversion.
impl From<KeyStore> for MetaDomain[src]
impl From<KeyStore> for MetaDomainimpl Debug for MetaDomain[src]
impl Debug for MetaDomainfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for MetaDomain[src]
impl Clone for MetaDomainfn clone(&self) -> MetaDomain[src]
fn clone(&self) -> MetaDomainReturns 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 MetaDomainimpl PartialEq for MetaDomain[src]
impl PartialEq for MetaDomainfn eq(&self, other: &MetaDomain) -> bool[src]
fn eq(&self, other: &MetaDomain) -> boolThis 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) -> boolThis method tests for !=.
impl AutoEncoder for MetaDomain[src]
impl AutoEncoder for MetaDomainfn 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 MetaDomainAuto Trait Implementations
impl Send for MetaDomain
impl Send for MetaDomainimpl Sync for MetaDomain
impl Sync for MetaDomain