1#![forbid(unsafe_code)]
7
8pub mod debugger;
9pub mod disconnected;
10pub mod resources;
11pub mod serial_io;
12
13use futures::io::AsyncRead;
14use futures::io::AsyncWrite;
15use inspect::InspectMut;
16use std::task::Context;
17use std::task::Poll;
18
19pub trait SerialIo: AsyncRead + AsyncWrite + Send + InspectMut + Unpin {
21 fn is_connected(&self) -> bool;
23
24 fn poll_connect(&mut self, cx: &mut Context<'_>) -> Poll<std::io::Result<()>>;
29
30 fn poll_disconnect(&mut self, cx: &mut Context<'_>) -> Poll<std::io::Result<()>>;
32}