pub trait ConnectionExt: Connection {
    fn read(&mut self) -> Result<u8, Self::Error>;
fn peek(&mut self) -> Result<Option<u8>, Self::Error>; }
Expand description

Extends Connection with read and peek methods.

This trait is used as part of gdbstub’s quickstart GdbStub::run_blocking API.

When the std feature is enabled, this trait is automatically implemented for TcpStream and UnixStream (on unix systems).

Required methods

Read a single byte.

Peek a single byte. This MUST be a non-blocking operation, returning None if no byte is available.

Returns a byte (if one is available) without removing that byte from the queue. Subsequent calls to peek MUST return the same byte.

Trait Implementations

Transport-specific error type.

Write a single byte.

Write the entire buffer, blocking until complete. Read more

Flush this Connection, ensuring that all intermediately buffered contents reach their destination. Read more

Called at the start of a debugging session before any GDB packets have been sent/received. Read more

Read a single byte.

Peek a single byte. This MUST be a non-blocking operation, returning None if no byte is available. Read more

Implementations on Foreign Types

Implementors