axlog

Trait LogIf

Source
pub trait LogIf {
    // Required methods
    fn console_write_str(s: &str);
    fn current_time() -> Duration;
    fn current_cpu_id() -> Option<usize>;
    fn current_task_id() -> Option<u64>;
}
Expand description

Extern interfaces that must be implemented in other crates.

Required Methods§

Source

fn console_write_str(s: &str)

Writes a string to the console.

Source

fn current_time() -> Duration

Gets current clock time.

Source

fn current_cpu_id() -> Option<usize>

Gets current CPU ID.

Returns None if you don’t want to show the CPU ID in the log.

Source

fn current_task_id() -> Option<u64>

Gets current task ID.

Returns None if you don’t want to show the task ID in the log.

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§