pub trait AsyncMinitelRead {
// Required method
async fn read(&mut self, data: &mut [u8]) -> Result<()>;
// Provided methods
async fn read_byte(&mut self) -> Result<u8> { ... }
async fn read_s0_stroke(&mut self) -> Result<UserInput> { ... }
async fn wait_for(&mut self, byte: impl Into<u8> + Copy) -> Result<()> { ... }
async fn expect_read(&mut self, byte: impl Into<u8> + Copy) -> Result<()> { ... }
async fn read_pro2(&mut self, expected_ack: Pro2Resp) -> Result<u8> { ... }
async fn read_pro3(&mut self, expected_ack: Pro3Resp) -> Result<(u8, u8)> { ... }
}Required Methods§
Provided Methods§
async fn read_byte(&mut self) -> Result<u8>
Sourceasync fn read_s0_stroke(&mut self) -> Result<UserInput>
async fn read_s0_stroke(&mut self) -> Result<UserInput>
Read a key stroke from the minitel assuming it is in S0 (text) mode.
G0 and G2 characters are returned as unicode characters.
async fn wait_for(&mut self, byte: impl Into<u8> + Copy) -> Result<()>
async fn expect_read(&mut self, byte: impl Into<u8> + Copy) -> Result<()>
async fn read_pro2(&mut self, expected_ack: Pro2Resp) -> Result<u8>
async fn read_pro3(&mut self, expected_ack: Pro3Resp) -> Result<(u8, u8)>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl AsyncMinitelRead for minitel::axum::Port
Available on crate feature
axum only.impl<'a, T> AsyncMinitelRead for minitel::esp::Port<'a, T>where
T: BorrowMut<UartDriver<'a>>,
Available on crate feature
espdoc and (crate features esp or espdoc) only.impl<T> AsyncMinitelRead for T
Available on crate feature
futures only.