[][src]Trait debcontrol::BufParseInput

pub trait BufParseInput {
    type Error;
    fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>;
}

A helper trait for stream input.

This trait is modeled on std's Read, but is separate so it's usable with no_std. When the std feature is enabled (it is by default), this trait has a blanket implementation for every type that implement std's Read.

Associated Types

type Error

The error type returned by read operations.

Loading content...

Required methods

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

Read bytes into the provided buffer, up to its length, and return the number of bytes read.

This function may read fewer bytes. If no more input is available, it should not modify the buffer and merely return 0.

Loading content...

Implementors

impl<R: Read + ?Sized> BufParseInput for R[src]

type Error = Error

Loading content...