Skip to main content

HostLogger

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 component-model and crate feature runtime 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".

Implementations on Foreign Types§

Source§

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

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§

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

Implementors§