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.
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.