Trait AsyncMinitelRead

Source
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§

Source

async fn read(&mut self, data: &mut [u8]) -> Result<()>

Provided Methods§

Source

async fn read_byte(&mut self) -> Result<u8>

Source

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.

Source

async fn wait_for(&mut self, byte: impl Into<u8> + Copy) -> Result<()>

Source

async fn expect_read(&mut self, byte: impl Into<u8> + Copy) -> Result<()>

Source

async fn read_pro2(&mut self, expected_ack: Pro2Resp) -> Result<u8>

Source

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§

Source§

impl AsyncMinitelRead for minitel::axum::Port

Available on crate feature axum only.
Source§

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.
Source§

impl<T> AsyncMinitelRead for T
where T: AsyncRead + Unpin,

Available on crate feature futures only.