pub enum OutputFormat {
Text,
Json,
Custom(String),
}Expand description
Output format enum
Defines supported log output formats.
§Examples
use rslog::OutputFormat;
let format = OutputFormat::Json;
let custom = OutputFormat::Custom("%d [%p] %m".to_string());Variants§
Text
Text format: [timestamp] [level] message
Json
JSON format: {"time":"...","level":"...","message":"..."}
Custom(String)
Custom format using placeholders
Trait Implementations§
Source§impl Clone for OutputFormat
impl Clone for OutputFormat
Source§fn clone(&self) -> OutputFormat
fn clone(&self) -> OutputFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OutputFormat
impl Debug for OutputFormat
Source§impl PartialEq for OutputFormat
impl PartialEq for OutputFormat
Source§fn eq(&self, other: &OutputFormat) -> bool
fn eq(&self, other: &OutputFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for OutputFormat
impl StructuralPartialEq for OutputFormat
Auto Trait Implementations§
impl Freeze for OutputFormat
impl RefUnwindSafe for OutputFormat
impl Send for OutputFormat
impl Sync for OutputFormat
impl Unpin for OutputFormat
impl UnsafeUnpin for OutputFormat
impl UnwindSafe for OutputFormat
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