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