polymer-core 0.1.0

Core traits for embedded async IO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use core::{
    pin::Pin,
    task::{self, Poll},
};

use super::Read;

pub trait BufRead: Read {
    fn poll_fill_buf<'a>(
        self: Pin<&'a mut Self>,
        cx: &mut task::Context<'_>,
    ) -> Poll<Result<&'a [u8], Self::Error>>;

    fn consume(self: Pin<&mut Self>, amount: usize);
}