pub struct Record {
pub sequence: u64,
pub level: Level,
pub target: String,
pub message: String,
pub elapsed: Duration,
}Expand description
One record, as the console reads it.
Distinct from crate::log::CapturedRecord, which is a test’s view and
carries no time: a panel draws the elapsed seconds and needs a cursor into
the ring, and a capture assertion wants neither.
Fields§
§sequence: u64Where this record sits in the run’s order, counted from the first record pushed and never reused.
What snapshot_since takes, so a reader that draws every frame copies
the lines that arrived since it last looked instead of the whole ring.
level: LevelThe level the record was logged at.
target: StringThe record’s target — the module path, unless the call overrode it, as
print() does.
message: StringThe formatted message.
elapsed: DurationHow long into the run the record was logged, as the sink measured it.
Trait Implementations§
impl Eq for Record
impl StructuralPartialEq for Record
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnsafeUnpin for Record
impl UnwindSafe for Record
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