pub struct ImmutableLog { /* private fields */ }Expand description
Immutable log service
Implementations§
Source§impl ImmutableLog
impl ImmutableLog
Sourcepub async fn with_wal_path<P: AsRef<Path>>(path: P) -> Result<Self, LogError>
pub async fn with_wal_path<P: AsRef<Path>>(path: P) -> Result<Self, LogError>
Create immutable log backed by an append-only WAL file and replay existing entries on boot.
Sourcepub async fn entry_count(&self) -> usize
pub async fn entry_count(&self) -> usize
Get number of entries currently stored in the chain.
Sourcepub async fn current_hash(&self) -> String
pub async fn current_hash(&self) -> String
Get the current chain hash (or genesis hash if empty).
Sourcepub async fn get_hourly_root(&self) -> Option<HourlyRoot>
pub async fn get_hourly_root(&self) -> Option<HourlyRoot>
Get current hourly root
Sourcepub async fn hourly_roots_snapshot(&self) -> Vec<HourlyRoot>
pub async fn hourly_roots_snapshot(&self) -> Vec<HourlyRoot>
Snapshot hourly roots (published roots + current in-progress hour root if present).
Sourcepub async fn get_chain_proof(&self, entry_id: &str) -> Option<ChainProof>
pub async fn get_chain_proof(&self, entry_id: &str) -> Option<ChainProof>
Generate chain proof for an entry
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImmutableLog
impl !RefUnwindSafe for ImmutableLog
impl Send for ImmutableLog
impl Sync for ImmutableLog
impl Unpin for ImmutableLog
impl UnsafeUnpin for ImmutableLog
impl !UnwindSafe for ImmutableLog
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