embedded_platform/
platform.rs

1use core::fmt;
2use core::task;
3
4pub mod initialize;
5
6pub trait Platform: fmt::Debug + Sized {
7    type Error;
8    fn poll_initialize(cx: &mut task::Context<'_>) -> task::Poll<Result<Self, Self::Error>>;
9}
10
11pub trait PlatformExt: Platform {
12    fn initialize() -> initialize::Initialize<Self> {
13        initialize::initialize()
14    }
15}
16
17impl<A> PlatformExt for A where A: Platform {}