Trait TracerConfig

Source
pub trait TracerConfig {
    // Required methods
    fn now() -> String;
    fn line() -> u32;
    fn file() -> &'static str;
    fn module_path() -> &'static str;
    fn thread_id() -> ThreadId;
    fn timestamp() -> u128;
}
Expand description

A trait for accessing information about the current state of the program that can be included in log messages.

Required Methods§

Source

fn now() -> String

Returns a string representation of the current time.

Source

fn line() -> u32

Returns the current line number.

Source

fn file() -> &'static str

Returns the name of the current file.

Source

fn module_path() -> &'static str

Returns the path of the current module.

Source

fn thread_id() -> ThreadId

Returns the ID of the current thread.

Source

fn timestamp() -> u128

Returns a timestamp representing the current time.

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 TracerConfig for ()

Implementors§