pub trait Api: Send {
    const MAX_TIME: u64;

    // Required methods
    fn time() -> u64;
    fn exit(success: bool) -> !;

    // Provided method
    fn println(line: &str) { ... }
}
Expand description

Debugging and testing interface.

Required Associated Constants§

source

const MAX_TIME: u64

Maximum value returned by Self::time() before wrapping.

Required Methods§

source

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.

source

fn exit(success: bool) -> !

Exits the platform with a success/failure result.

Provided Methods§

source

fn println(line: &str)

Prints a line with timestamp.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Api for Impl

source§

const MAX_TIME: u64 = 0u64