pub struct MemoryAuditSink { /* private fields */ }Expand description
Stores events in memory. Cheap; useful for tests and short-lived processes.
Implementations§
Trait Implementations§
Source§impl AuditSink for MemoryAuditSink
impl AuditSink for MemoryAuditSink
fn record<'life0, 'async_trait>(
&'life0 self,
event: AuditEvent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn list_events<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<Vec<AuditEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_events<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<Vec<AuditEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return all recorded events, or
None if the sink doesn’t retain them.Source§impl Clone for MemoryAuditSink
impl Clone for MemoryAuditSink
Source§fn clone(&self) -> MemoryAuditSink
fn clone(&self) -> MemoryAuditSink
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for MemoryAuditSink
impl Default for MemoryAuditSink
Source§fn default() -> MemoryAuditSink
fn default() -> MemoryAuditSink
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MemoryAuditSink
impl RefUnwindSafe for MemoryAuditSink
impl Send for MemoryAuditSink
impl Sync for MemoryAuditSink
impl Unpin for MemoryAuditSink
impl UnsafeUnpin for MemoryAuditSink
impl UnwindSafe for MemoryAuditSink
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