pub struct AuditRing { /* private fields */ }Expand description
Fixed-capacity audit ring.
Implementations§
Source§impl AuditRing
impl AuditRing
Sourcepub fn set_observer(&mut self, observer: AuditObserver)
pub fn set_observer(&mut self, observer: AuditObserver)
Installs observer, replacing any previous one. It sees every
record appended from this point on, including records that are
later overwritten before a host drains them.
Sourcepub fn has_observer(&self) -> bool
pub fn has_observer(&self) -> bool
Whether an observer is installed.
Sourcepub fn append(&mut self, record: AuditRecord) -> u64
pub fn append(&mut self, record: AuditRecord) -> u64
Appends a record, overwriting the oldest entry when full, and returns the assigned sequence number.
Sourcepub fn oldest_retained(&self) -> Option<u64>
pub fn oldest_retained(&self) -> Option<u64>
The oldest sequence number still retained.
Sourcepub fn next_sequence(&self) -> u64
pub fn next_sequence(&self) -> u64
The sequence number the next appended record will receive.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AuditRing
impl !UnwindSafe for AuditRing
impl Freeze for AuditRing
impl Send for AuditRing
impl Sync for AuditRing
impl Unpin for AuditRing
impl UnsafeUnpin for AuditRing
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