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§
sourcefn console_write_str(s: &str)
fn console_write_str(s: &str)
Writes a string to the console.
sourcefn current_time() -> Duration
fn current_time() -> Duration
Gets current clock time.
sourcefn current_cpu_id() -> Option<usize>
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.
sourcefn current_task_id() -> Option<u64>
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.
Object Safety§
This trait is not object safe.