pub struct MemoryAuditLog { /* private fields */ }Implementations§
Trait Implementations§
Source§impl AuditLog for MemoryAuditLog
impl AuditLog for MemoryAuditLog
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.Source§impl Default for MemoryAuditLog
impl Default for MemoryAuditLog
Source§fn default() -> MemoryAuditLog
fn default() -> MemoryAuditLog
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MemoryAuditLog
impl !RefUnwindSafe for MemoryAuditLog
impl Send for MemoryAuditLog
impl Sync for MemoryAuditLog
impl Unpin for MemoryAuditLog
impl UnsafeUnpin for MemoryAuditLog
impl !UnwindSafe for MemoryAuditLog
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