Skip to main content

PlcDirectoryStore

Trait PlcDirectoryStore 

Source
pub trait PlcDirectoryStore: Send + Sync {
    // Required methods
    fn create_genesis(
        &self,
        did: &str,
        record: PlcDirectoryRecord,
    ) -> Result<()>;
    fn get(&self, did: &str) -> Result<Option<PlcDirectoryRecord>>;
}
Expand description

Atomic genesis storage used by the operable directory.

There is intentionally no update method in the demo cut. Rotation and witness policy are deferred to #1168–1171.

Required Methods§

Source

fn create_genesis(&self, did: &str, record: PlcDirectoryRecord) -> Result<()>

Insert operation zero exactly once for did.

Source

fn get(&self, did: &str) -> Result<Option<PlcDirectoryRecord>>

Load one record for verification, or None when it is absent.

Implementors§