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