Skip to main content

ILogMonitor

Trait ILogMonitor 

Source
pub trait ILogMonitor: Send + Sync {
    // Required methods
    fn log<'life0, 'async_trait>(
        &'life0 self,
        event: MonitoringEvent,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn flush<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Async sink for MonitoringEvent records.

Required Methods§

Source

fn log<'life0, 'async_trait>( &'life0 self, event: MonitoringEvent, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Receives one monitoring event. Returns an error if the event cannot be recorded.

Source

fn flush<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Flushes any buffered events. Returns an error if the flush fails.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§