Struct breadcrumbs::Log
source · pub struct Log {
pub channel: String,
pub level: LogLevel,
pub message: String,
}Expand description
Represents a log entry.
Log beautifully implements Display for easy printing.
use breadcrumbs::Log;
let log = Log::new(String::from("test_channel"), breadcrumbs::LogLevel::Info, String::from("Test log message"));
assert_eq!(format!("{}", log), "[test_channel/Info] Test log message");Fields§
§channel: String§level: LogLevel§message: StringImplementations§
Trait Implementations§
source§impl Ord for Log
impl Ord for Log
source§impl PartialOrd for Log
impl PartialOrd for Log
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Log
impl StructuralEq for Log
impl StructuralPartialEq for Log
Auto Trait Implementations§
impl RefUnwindSafe for Log
impl Send for Log
impl Sync for Log
impl Unpin for Log
impl UnwindSafe for Log
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