pub struct AuditQuery { /* private fields */ }Expand description
Builder for filtering audit events by time range, event type, actor, or resource.
Implementations§
Source§impl AuditQuery
impl AuditQuery
pub fn new() -> Self
Sourcepub fn time_range(self, start: DateTime<Utc>, end: DateTime<Utc>) -> Self
pub fn time_range(self, start: DateTime<Utc>, end: DateTime<Utc>) -> Self
Filter events within a time range (inclusive).
Sourcepub fn matches(&self, event: &AuditEvent) -> bool
pub fn matches(&self, event: &AuditEvent) -> bool
Test whether an event matches this query.
Sourcepub fn filter<'a>(&self, events: &'a [AuditEvent]) -> Vec<&'a AuditEvent>
pub fn filter<'a>(&self, events: &'a [AuditEvent]) -> Vec<&'a AuditEvent>
Apply this query to a slice of events, returning matching events.
Trait Implementations§
Source§impl Clone for AuditQuery
impl Clone for AuditQuery
Source§fn clone(&self) -> AuditQuery
fn clone(&self) -> AuditQuery
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 AuditQuery
impl Debug for AuditQuery
Source§impl Default for AuditQuery
impl Default for AuditQuery
Source§fn default() -> AuditQuery
fn default() -> AuditQuery
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AuditQuery
impl RefUnwindSafe for AuditQuery
impl Send for AuditQuery
impl Sync for AuditQuery
impl Unpin for AuditQuery
impl UnsafeUnpin for AuditQuery
impl UnwindSafe for AuditQuery
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