Skip to main content

RegistryShard

Trait RegistryShard 

Source
pub trait RegistryShard {
    // Required methods
    fn register(
        &mut self,
        hash: StrHash,
        raw: String,
    ) -> Result<(), StorageError>;
    fn lookup(&self, hash: StrHash) -> Result<Option<String>, StorageError>;
}
Expand description

Single shard of the distributed string registry.

Required Methods§

Source

fn register(&mut self, hash: StrHash, raw: String) -> Result<(), StorageError>

Register raw under hash (overwrites on duplicate).

Source

fn lookup(&self, hash: StrHash) -> Result<Option<String>, StorageError>

Look up the raw string for hash.

Implementors§