Struct noodles_bgzf::AsyncReader [−][src]
pub struct AsyncReader<R> where
R: AsyncRead, { /* fields omitted */ }
Expand description
An async BGZF reader.
Implementations
Creates an async BGZF reader builder.
Examples
use noodles_bgzf as bgzf;
let data = [];
let builder = bgzf::AsyncReader::builder(&data[..]);
let reader = builder.build();
Creates an async BGZF reader.
Examples
use noodles_bgzf as bgzf;
let data = [];
let reader = bgzf::AsyncReader::new(&data[..]);
Returns the current virtual position of the stream.
Examples
use noodles_bgzf as bgzf;
let data = [];
let reader = bgzf::AsyncReader::new(&data[..]);
assert_eq!(reader.virtual_position(), bgzf::VirtualPosition::from(0));
Seeks the stream to the given virtual position.
Examples
use noodles_bgzf as bgzf;
let mut reader = bgzf::AsyncReader::new(Cursor::new(Vec::new()));
let virtual_position = bgzf::VirtualPosition::from(102334155);
reader.seek(virtual_position).await?;
Trait Implementations
Attempts to return the contents of the internal buffer, filling it with more data from the inner reader if it is empty. Read more
Auto Trait Implementations
impl<R> !RefUnwindSafe for Reader<R>
impl<R> !UnwindSafe for Reader<R>
Blanket Implementations
Reads all bytes into buf
until the delimiter byte
or EOF is reached. Read more
Reads all bytes until a newline (the 0xA byte) is reached, and append them to the provided buffer. Read more
Returns a stream of the contents of this reader split on the byte
byte
. Read more
Returns the contents of the internal buffer, filling it with more data from the inner reader if it is empty. Read more
Returns a stream over the lines of this reader.
This method is the async equivalent to BufRead::lines
. Read more
Creates a new AsyncRead
instance that chains this stream with
next
. Read more
Pulls some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Pulls some bytes from this source into the specified buffer, advancing the buffer’s internal cursor. Read more
Reads the exact number of bytes required to fill buf
. Read more
Reads an unsigned 8 bit integer from the underlying reader. Read more
Reads a signed 8 bit integer from the underlying reader. Read more
Reads an unsigned 16-bit integer in big-endian order from the underlying reader. Read more
Reads a signed 16-bit integer in big-endian order from the underlying reader. Read more
Reads an unsigned 32-bit integer in big-endian order from the underlying reader. Read more
Reads a signed 32-bit integer in big-endian order from the underlying reader. Read more
Reads an unsigned 64-bit integer in big-endian order from the underlying reader. Read more
Reads an signed 64-bit integer in big-endian order from the underlying reader. Read more
Reads an unsigned 128-bit integer in big-endian order from the underlying reader. Read more
Reads an signed 128-bit integer in big-endian order from the underlying reader. Read more
Reads an 32-bit floating point type in big-endian order from the underlying reader. Read more
Reads an 64-bit floating point type in big-endian order from the underlying reader. Read more
Reads an unsigned 16-bit integer in little-endian order from the underlying reader. Read more
Reads a signed 16-bit integer in little-endian order from the underlying reader. Read more
Reads an unsigned 32-bit integer in little-endian order from the underlying reader. Read more
Reads a signed 32-bit integer in little-endian order from the underlying reader. Read more
Reads an unsigned 64-bit integer in little-endian order from the underlying reader. Read more
Reads an signed 64-bit integer in little-endian order from the underlying reader. Read more
Reads an unsigned 128-bit integer in little-endian order from the underlying reader. Read more
Reads an signed 128-bit integer in little-endian order from the underlying reader. Read more
Reads an 32-bit floating point type in little-endian order from the underlying reader. Read more
Reads an 64-bit floating point type in little-endian order from the underlying reader. Read more
Reads all bytes until EOF in this source, placing them into buf
. Read more
fn read_to_string(&'a mut self, dst: &'a mut String) -> ReadToString<'a, Self> where
Self: Unpin,
fn read_to_string(&'a mut self, dst: &'a mut String) -> ReadToString<'a, Self> where
Self: Unpin,
Reads all bytes until EOF in this source, appending them to buf
. Read more
Mutably borrows from an owned value. Read more