pub struct StderrStream { /* private fields */ }Expand description
Used for printing logs to stderr.
§Examples
Printing a log to stderr:
// Required by `StderrStream` for parsing logs
let mut formatter = LogFormatter::default();
// Enabled by default
let mut stderr_output = StderrStream::default();
// Print "Hello, World!" in a neat log format
stderr_output.out(&LogStruct::debug("Hello, World!"), &mut formatter);Implementations§
Source§impl StderrStream
impl StderrStream
Sourcepub fn out(self, log: &LogStruct, formatter: &mut LogFormatter)
pub fn out(self, log: &LogStruct, formatter: &mut LogFormatter)
Formats the given log using a formatter and prints it to stderr.
Trait Implementations§
Source§impl Clone for StderrStream
impl Clone for StderrStream
Source§fn clone(&self) -> StderrStream
fn clone(&self) -> StderrStream
Returns a duplicate of the value. Read more
1.0.0 · 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 StderrStream
impl Debug for StderrStream
Source§impl Default for StderrStream
impl Default for StderrStream
Source§impl<'de> Deserialize<'de> for StderrStream
impl<'de> Deserialize<'de> for StderrStream
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for StderrStream
impl Hash for StderrStream
Source§impl Ord for StderrStream
impl Ord for StderrStream
Source§fn cmp(&self, other: &StderrStream) -> Ordering
fn cmp(&self, other: &StderrStream) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for StderrStream
impl PartialEq for StderrStream
Source§impl PartialOrd for StderrStream
impl PartialOrd for StderrStream
Source§impl Serialize for StderrStream
impl Serialize for StderrStream
Source§impl Toggleable for StderrStream
impl Toggleable for StderrStream
impl Copy for StderrStream
impl Eq for StderrStream
impl StructuralPartialEq for StderrStream
Auto Trait Implementations§
impl Freeze for StderrStream
impl RefUnwindSafe for StderrStream
impl Send for StderrStream
impl Sync for StderrStream
impl Unpin for StderrStream
impl UnwindSafe for StderrStream
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