pub trait Store {
    fn get_entry(&self, hash: &EntryHash) -> StateQueryResult<Option<Entry>>;
    fn get_public_or_authored_entry(
        &self,
        hash: &EntryHash,
        author: Option<&AgentPubKey>
    ) -> StateQueryResult<Option<Entry>>; fn get_action(
        &self,
        hash: &ActionHash
    ) -> StateQueryResult<Option<SignedActionHashed>>; fn get_record(&self, hash: &AnyDhtHash) -> StateQueryResult<Option<Record>>; fn get_public_or_authored_record(
        &self,
        hash: &AnyDhtHash,
        author: Option<&AgentPubKey>
    ) -> StateQueryResult<Option<Record>>; fn contains_entry(&self, hash: &EntryHash) -> StateQueryResult<bool>; fn contains_action(&self, hash: &ActionHash) -> StateQueryResult<bool>; fn contains_hash(&self, hash: &AnyDhtHash) -> StateQueryResult<bool> { ... } }

Required Methods

source

fn get_entry(&self, hash: &EntryHash) -> StateQueryResult<Option<Entry>>

Get an [Entry] from this store.

source

fn get_public_or_authored_entry(
    &self,
    hash: &EntryHash,
    author: Option<&AgentPubKey>
) -> StateQueryResult<Option<Entry>>

Get an [Entry] from this store.

  • Will return any public entry.
  • If an author is provided and an action for this entry matches the author then any entry will be return regardless of visibility .

Get an [SignedActionHashed] from this store.

Get an [Record] from this store.

Get an [Record] from this store that is either public or authored by the given key.

source

fn contains_entry(&self, hash: &EntryHash) -> StateQueryResult<bool>

Check if an entry is contained in the store

Check if an action is contained in the store

Provided Methods

Check if a hash is contained in the store

Implementors