use alloc::boxed::Box; use core::{ future::Future, pin::Pin, task::{Context, Poll}, }; pub mod keyboard; pub mod simple_executor; pub struct Task { future: Pin>>, } impl Task { pub fn new(future: impl Future + 'static) -> Task { Task { future: Box::pin(future), } } fn poll(&mut self, context: &mut Context) -> Poll<()> { self.future.as_mut().poll(context) } }