Append

Trait Append 

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

    // Provided method
    fn flush(&self) -> Result<(), Error> { ... }
}
Expand description

A trait representing an appender that can process log records.

Required Methods§

Source

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

Dispatches a log record to the append target.

Provided Methods§

Source

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

Flushes any buffered records.

Default to a no-op.

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.

Implementors§