Skip to main content

Append

Trait Append 

Source
pub trait Append:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn append(
        &self,
        record: &Record<'_>,
        diags: &[Box<dyn Diagnostic>],
    ) -> Result<(), Error>;
    fn flush(&self) -> Result<(), Error>;
}
Expand description

An appender that can process log records.

Required Methods§

Source

fn append( &self, record: &Record<'_>, diags: &[Box<dyn Diagnostic>], ) -> Result<(), Error>

Dispatch a log record to the append target.

Source

fn flush(&self) -> Result<(), Error>

Flush any buffered records.

Trait Implementations§

Source§

impl<T: Append> From<T> for Box<dyn Append>

Source§

fn from(value: T) -> Self

Converts to this type from the input type.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§