Trait LogFormat

Source
pub trait LogFormat<T> {
    // Required method
    fn format_at<W: Write>(
        &self,
        w: &mut W,
        severity: Severity,
        time: OffsetDateTime,
        message: &T,
    ) -> Result<()>;

    // Provided methods
    fn format<W: Write>(
        &self,
        w: &mut W,
        severity: Severity,
        message: &T,
    ) -> Result<()> { ... }
    fn emerg<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()> { ... }
    fn alert<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()> { ... }
    fn crit<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()> { ... }
    fn err<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()> { ... }
    fn warning<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()> { ... }
    fn notice<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()> { ... }
    fn info<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()> { ... }
    fn debug<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()> { ... }
}

Required Methods§

Source

fn format_at<W: Write>( &self, w: &mut W, severity: Severity, time: OffsetDateTime, message: &T, ) -> Result<()>

Provided Methods§

Source

fn format<W: Write>( &self, w: &mut W, severity: Severity, message: &T, ) -> Result<()>

Source

fn emerg<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()>

Source

fn alert<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()>

Source

fn crit<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()>

Source

fn err<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()>

Source

fn warning<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()>

Source

fn notice<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()>

Source

fn info<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()>

Source

fn debug<W: Write>(&mut self, w: &mut W, message: &T) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§