Trait Logger

Source
pub trait Logger {
    // Required methods
    fn open(&mut self) -> Option<Error>;
    fn write_slice<T: Display>(&self, to_write: &[&T]) -> Option<Error>;
    fn write<T: Display>(&self, to_write: T) -> Option<Error>;
}

Required Methods§

Source

fn open(&mut self) -> Option<Error>

Initializes the channel of communication to whatever destination the logger sends data to.

Source

fn write_slice<T: Display>(&self, to_write: &[&T]) -> Option<Error>

Writes the a slice’s data to the destination of the logger.

Source

fn write<T: Display>(&self, to_write: T) -> Option<Error>

Writes the object’s data to the destination of the logger.

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.

Implementors§