Skip to main content

LocalRepositories

Trait LocalRepositories 

Source
pub trait LocalRepositories: Send + Sync {
    // Required methods
    fn holds(&self, did: &str) -> bool;
    fn serves(&self, host: &str) -> bool;
}
Expand description

What this deployment already holds, so the reader never fetches it over the network.

A repository this server hosts is read from its own store, and a name this server answers to is this server. Both are refusals rather than fetches: a DID document that points back here, whether stale or planted, would otherwise turn every foreign read into a request this deployment makes of itself.

Required Methods§

Source

fn holds(&self, did: &str) -> bool

Whether this deployment holds did’s repository.

Source

fn serves(&self, host: &str) -> bool

Whether host is a name this deployment answers to.

Implementors§