pub struct FileAuditLog { /* private fields */ }Implementations§
Trait Implementations§
Source§impl AuditLog for FileAuditLog
impl AuditLog for FileAuditLog
Source§fn append<'life0, 'async_trait>(
&'life0 self,
event: Event,
) -> Pin<Box<dyn Future<Output = AuditResult<EventReceipt>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append<'life0, 'async_trait>(
&'life0 self,
event: Event,
) -> Pin<Box<dyn Future<Output = AuditResult<EventReceipt>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Append an event to the log. Returns a receipt the caller can keep
as proof the event is recorded (contains event id + chain head at
the time of append).
Source§fn current_head<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AuditResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn current_head<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AuditResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The current chain head: hex-encoded hash of the last appended event,
or the genesis sentinel if the log is empty.
Source§fn verify_chain<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AuditResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn verify_chain<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AuditResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Replay the full chain, verifying every stored hash against the
canonical bytes of the event. Returns
Ok(()) if the chain is
intact; errors identify the first event at which verification failed.Auto Trait Implementations§
impl Freeze for FileAuditLog
impl !RefUnwindSafe for FileAuditLog
impl Send for FileAuditLog
impl Sync for FileAuditLog
impl Unpin for FileAuditLog
impl UnsafeUnpin for FileAuditLog
impl !UnwindSafe for FileAuditLog
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