pub struct LogChain { /* private fields */ }Expand description
Log chain state
Implementations§
Source§impl LogChain
impl LogChain
Sourcepub async fn append(&mut self, entry: LogEntry) -> Result<LogEntry, LogError>
pub async fn append(&mut self, entry: LogEntry) -> Result<LogEntry, LogError>
Append entry to chain
pub fn get_entry(&self, entry_id: &str) -> Option<&LogEntry>
Sourcepub fn generate_proof(&self, entry_id: &str) -> Option<ChainProof>
pub fn generate_proof(&self, entry_id: &str) -> Option<ChainProof>
Generate proof for entry (includes all steps up to current head).
Sourcepub fn current_hash(&self) -> &str
pub fn current_hash(&self) -> &str
Get current hash
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LogChain
impl RefUnwindSafe for LogChain
impl Send for LogChain
impl Sync for LogChain
impl Unpin for LogChain
impl UnsafeUnpin for LogChain
impl UnwindSafe for LogChain
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more