LogClient

Trait LogClient 

Source
pub trait LogClient<'a, T: Serialize + Deserialize<'a>, TL: TransparentLog<'a, T>> {
    // Required methods
    fn latest(&self) -> &LogTree<TL::LogSize>;
    fn set_latest(&mut self, latest: LogTree<TL::LogSize>);
    fn cached(&self, position: &LogTreePosition<TL::LogSize>) -> Option<String>;
    fn add_cached(
        &mut self,
        proofs: &HashMap<LogTreePosition<TL::LogSize>, String>,
    );
}
Expand description

A simple log client, optionally keeping a cache of tree entries

Required Methods§

Source

fn latest(&self) -> &LogTree<TL::LogSize>

Get the latest tree information stored

Source

fn set_latest(&mut self, latest: LogTree<TL::LogSize>)

Set the latest tree information

Source

fn cached(&self, position: &LogTreePosition<TL::LogSize>) -> Option<String>

Get a cached position if known

Source

fn add_cached(&mut self, proofs: &HashMap<LogTreePosition<TL::LogSize>, String>)

Cache all positions in the HashMap

Implementors§

Source§

impl<'a, T: Serialize + Deserialize<'a>, TL: TransparentLog<'a, T>> LogClient<'a, T, TL> for InMemoryLogClient<'a, T, TL>