pub trait Api: Send {
const MAX_TIME: u64;
// Required method
fn time() -> u64;
// Provided method
fn println(line: &str) { ... }
}
Expand description
Debugging and testing interface.
Required Associated Constants§
Sourceconst MAX_TIME: u64
const MAX_TIME: u64
Maximum value returned by Self::time()
before wrapping.
Required Methods§
Sourcefn time() -> u64
fn time() -> u64
Returns the time in micro-seconds since some initial event.
This wraps once Self::MAX_TIME
is reached. In particular, a maximum value of zero
equivalent to not supporting this API.
Provided Methods§
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.