pub trait Machinelike {
type ExcepBacktrace: Display;
type ExcepStackFrame: Display;
type FaultStatus: Display;
// Required methods
fn init();
fn print(s: &str) -> Result<(), Error>;
fn bench_start();
fn bench_end() -> (u32, f32);
fn monotonic_now() -> u64;
fn monotonic_freq() -> u64;
fn systick_freq() -> u64;
fn backtrace(
initial_fp: *const usize,
stack_ptr: *const usize,
) -> Self::ExcepBacktrace;
fn stack_frame(stack_ptr: *const usize) -> Self::ExcepStackFrame;
fn get_fault_status(fault: Fault) -> Self::FaultStatus;
fn panic_handler(info: &PanicInfo<'_>) -> !;
}Required Associated Types§
type ExcepBacktrace: Display
type ExcepStackFrame: Display
type FaultStatus: Display
Required Methods§
fn init()
fn print(s: &str) -> Result<(), Error>
fn bench_start()
fn bench_end() -> (u32, f32)
fn monotonic_now() -> u64
fn monotonic_freq() -> u64
fn systick_freq() -> u64
fn backtrace( initial_fp: *const usize, stack_ptr: *const usize, ) -> Self::ExcepBacktrace
fn stack_frame(stack_ptr: *const usize) -> Self::ExcepStackFrame
fn get_fault_status(fault: Fault) -> Self::FaultStatus
fn panic_handler(info: &PanicInfo<'_>) -> !
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.