[][src]Trait gdbstub::Connection

pub trait Connection {
    type Error;
    fn read(&mut self) -> Result<u8, Self::Error>;
fn write(&mut self, byte: u8) -> Result<(), Self::Error>;
fn read_nonblocking(&mut self) -> Result<Option<u8>, Self::Error>; fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Self::Error> { ... } }

A trait for reading / writing bytes across some transport layer.

Associated Types

type Error

Transport-specific error type.

Loading content...

Required methods

fn read(&mut self) -> Result<u8, Self::Error>

Read a single byte.

fn write(&mut self, byte: u8) -> Result<(), Self::Error>

Write a single byte.

fn read_nonblocking(&mut self) -> Result<Option<u8>, Self::Error>

Try to read a single byte, returning None if no data is available.

Loading content...

Provided methods

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Self::Error>

Read the exact number of bytes required to fill buf, blocking if necessary.

Loading content...

Implementors

Loading content...