pub struct LogRing { /* private fields */ }Expand description
The last lines of a log, oldest first, and how many older ones were
dropped. Each line pushed gets a sequence number, from 0 and never
reused, so a reader takes the lines since the last it
took.
Implementations§
Source§impl LogRing
impl LogRing
Sourcepub fn push(&mut self, line: LogLine)
pub fn push(&mut self, line: LogLine)
Keeps line, dropping (and counting) the oldest when full.
Sourcepub fn add_dropped(&mut self, n: u32)
pub fn add_dropped(&mut self, n: u32)
Counts n more lines dropped (elsewhere, before they got here).
Trait Implementations§
impl Eq for LogRing
impl StructuralPartialEq for LogRing
Auto Trait Implementations§
impl Freeze for LogRing
impl RefUnwindSafe for LogRing
impl Send for LogRing
impl Sync for LogRing
impl Unpin for LogRing
impl UnsafeUnpin for LogRing
impl UnwindSafe for LogRing
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