Skip to main content

Targetable

Trait Targetable 

Source
pub trait Targetable:
    Send
    + Sync
    + 'static {
    // Required method
    fn write(&self, data: String);
}
Expand description

A trait for log targets. Implemented for Target and for all Fn(String) + Send + Sync + 'static.

Required Methods§

Source

fn write(&self, data: String)

write a log line

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl Targetable for LogTarget

Source§

impl Targetable for Target

Source§

impl<F> Targetable for F
where F: Fn(String) + Send + Sync + 'static,