Skip to main content

Host

Trait Host 

Source
pub trait Host: Send {
    // Required method
    fn on_emit(
        &mut self,
        data: LogRecord,
    ) -> impl Future<Output = Result<()>> + Send;
}

Required Methods§

Source

fn on_emit( &mut self, data: LogRecord, ) -> impl Future<Output = Result<()>> + Send

Called when a log is emitted.

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.

Implementations on Foreign Types§

Source§

impl<_T: Host + ?Sized + Send> Host for &mut _T

Source§

fn on_emit( &mut self, data: LogRecord, ) -> impl Future<Output = Result<()>> + Send

Called when a log is emitted.

Implementors§