pub struct InMemoryStorage { /* private fields */ }Expand description
In-memory audit storage (for testing and development)
Implementations§
Source§impl InMemoryStorage
impl InMemoryStorage
Sourcepub fn get_all_events(&self) -> Result<Vec<AuditEvent>>
pub fn get_all_events(&self) -> Result<Vec<AuditEvent>>
Get all events (for testing)
Trait Implementations§
Source§impl AuditStorage for InMemoryStorage
impl AuditStorage for InMemoryStorage
Source§fn retrieve_by_time_range(
&self,
start: DateTime<Utc>,
end: DateTime<Utc>,
) -> Result<Vec<AuditEvent>>
fn retrieve_by_time_range( &self, start: DateTime<Utc>, end: DateTime<Utc>, ) -> Result<Vec<AuditEvent>>
Retrieve events by time range
Source§fn retrieve_by_type(
&self,
event_type: &AuditEventType,
) -> Result<Vec<AuditEvent>>
fn retrieve_by_type( &self, event_type: &AuditEventType, ) -> Result<Vec<AuditEvent>>
Retrieve events by event type
Source§fn retrieve_by_severity(
&self,
severity: &AuditSeverity,
) -> Result<Vec<AuditEvent>>
fn retrieve_by_severity( &self, severity: &AuditSeverity, ) -> Result<Vec<AuditEvent>>
Retrieve events by severity
Source§fn retrieve_by_user(&self, user_id: &str) -> Result<Vec<AuditEvent>>
fn retrieve_by_user(&self, user_id: &str) -> Result<Vec<AuditEvent>>
Retrieve events by user
Source§fn get_statistics(&self) -> Result<StorageStatistics>
fn get_statistics(&self) -> Result<StorageStatistics>
Get storage statistics
Source§impl Clone for InMemoryStorage
impl Clone for InMemoryStorage
Source§fn clone(&self) -> InMemoryStorage
fn clone(&self) -> InMemoryStorage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InMemoryStorage
impl Debug for InMemoryStorage
Auto Trait Implementations§
impl Freeze for InMemoryStorage
impl RefUnwindSafe for InMemoryStorage
impl Send for InMemoryStorage
impl Sync for InMemoryStorage
impl Unpin for InMemoryStorage
impl UnsafeUnpin for InMemoryStorage
impl UnwindSafe for InMemoryStorage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more