pub type BytesStream<R> = RecordStream<Vec<u8>, R>;

Aliased Type§

struct BytesStream<R> { /* private fields */ }

Implementations§

source§

impl<T, R> RecordStream<T, R>where T: Record, R: AsyncRead,

source

pub fn from_reader(reader: R, config: RecordReaderConfig) -> Selfwhere R: 'static + Unpin + Send,

Load records from a reader type with [AsyncRead] trait.

source§

impl<T> RecordStream<T, BufReader<File>>where T: Record,

source

pub async fn open<P>(path: P, config: RecordReaderConfig) -> Result<Self>where T: Record, P: AsRef<Path>,

Load records from a file.

Trait Implementations§

source§

impl<T, R> Stream for RecordStream<T, R>where T: Record, R: AsyncRead,

§

type Item = Result<T, Error>

Values yielded by the stream.
source§

fn poll_next( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Option<Self::Item>>

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more
§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more
source§

impl<'pin, T, R> Unpin for RecordStream<T, R>where T: Record, R: AsyncRead, __RecordStream<'pin, T, R>: Unpin,