pub struct StorageQuery {
pub subject: Option<String>,
pub resource: Option<String>,
pub event_type: Option<AuditEventType>,
pub result: Option<AuditResult>,
pub tenant_id: Option<String>,
pub start_time: Option<DateTime<Utc>>,
pub end_time: Option<DateTime<Utc>>,
pub limit: Option<usize>,
}Expand description
Storage query.
Fields§
§subject: Option<String>Filter by subject.
resource: Option<String>Filter by resource.
event_type: Option<AuditEventType>Filter by event type.
result: Option<AuditResult>Filter by result.
tenant_id: Option<String>Filter by tenant ID.
start_time: Option<DateTime<Utc>>Time range start.
end_time: Option<DateTime<Utc>>Time range end.
limit: Option<usize>Maximum number of results.
Implementations§
Source§impl StorageQuery
impl StorageQuery
Sourcepub fn with_subject(self, subject: String) -> Self
pub fn with_subject(self, subject: String) -> Self
Filter by subject.
Sourcepub fn with_resource(self, resource: String) -> Self
pub fn with_resource(self, resource: String) -> Self
Filter by resource.
Sourcepub fn with_event_type(self, event_type: AuditEventType) -> Self
pub fn with_event_type(self, event_type: AuditEventType) -> Self
Filter by event type.
Sourcepub fn with_result(self, result: AuditResult) -> Self
pub fn with_result(self, result: AuditResult) -> Self
Filter by result.
Sourcepub fn with_tenant_id(self, tenant_id: String) -> Self
pub fn with_tenant_id(self, tenant_id: String) -> Self
Filter by tenant ID.
Sourcepub fn with_limit(self, limit: usize) -> Self
pub fn with_limit(self, limit: usize) -> Self
Set limit.
Sourcepub fn matches(&self, entry: &AuditLogEntry) -> bool
pub fn matches(&self, entry: &AuditLogEntry) -> bool
Check if entry matches query.
Trait Implementations§
Source§impl Clone for StorageQuery
impl Clone for StorageQuery
Source§fn clone(&self) -> StorageQuery
fn clone(&self) -> StorageQuery
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 StorageQuery
impl Debug for StorageQuery
Source§impl Default for StorageQuery
impl Default for StorageQuery
Source§fn default() -> StorageQuery
fn default() -> StorageQuery
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StorageQuery
impl RefUnwindSafe for StorageQuery
impl Send for StorageQuery
impl Sync for StorageQuery
impl Unpin for StorageQuery
impl UnsafeUnpin for StorageQuery
impl UnwindSafe for StorageQuery
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