pub trait HostLogger: Send {
    // Required methods
    fn new(
        &mut self,
        max_level: Level,
    ) -> impl Future<Output = Result<Resource<Logger>>> + Send;
    fn get_max_level(
        &mut self,
        self_: Resource<Logger>,
    ) -> impl Future<Output = Result<Level>> + Send;
    fn set_max_level(
        &mut self,
        self_: Resource<Logger>,
        level: Level,
    ) -> impl Future<Output = Result<()>> + Send;
    fn log(
        &mut self,
        self_: Resource<Logger>,
        level: Level,
        msg: String,
    ) -> impl Future<Output = Result<()>> + Send;
    fn drop(
        &mut self,
        rep: Resource<Logger>,
    ) -> impl Future<Output = Result<()>> + Send;
}
Available on crate feature runtime and crate feature component-model and docsrs only.

Required Methods§

Source

fn new( &mut self, max_level: Level, ) -> impl Future<Output = Result<Resource<Logger>>> + Send

Source

fn get_max_level( &mut self, self_: Resource<Logger>, ) -> impl Future<Output = Result<Level>> + Send

Source

fn set_max_level( &mut self, self_: Resource<Logger>, level: Level, ) -> impl Future<Output = Result<()>> + Send

Source

fn log( &mut self, self_: Resource<Logger>, level: Level, msg: String, ) -> impl Future<Output = Result<()>> + Send

Source

fn drop( &mut self, rep: Resource<Logger>, ) -> impl Future<Output = Result<()>> + Send

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: HostLogger + ?Sized + Send> HostLogger for &mut _T

Source§

async fn new(&mut self, max_level: Level) -> Result<Resource<Logger>>

Source§

async fn get_max_level(&mut self, self_: Resource<Logger>) -> Result<Level>

Source§

async fn set_max_level( &mut self, self_: Resource<Logger>, level: Level, ) -> Result<()>

Source§

async fn log( &mut self, self_: Resource<Logger>, level: Level, msg: String, ) -> Result<()>

Source§

async fn drop(&mut self, rep: Resource<Logger>) -> Result<()>

Implementors§