Struct qcow::Reader [−][src]
Expand description
A reader for reading from the guest virtual drive. Should be constructed using
Qcow2::reader
.
Example
use std::io::Read;
use std::fs::File;
let qcow = qcow::open(PATH)?.unwrap_qcow2();
let mut file = File::open(PATH)?;
let mut reader = qcow.reader(&mut file);
// read first 10 bytes from virtual drive
let mut buf = [0u8; 10];
reader.read_exact(&mut buf)?;
Implementations
Returns the current read position within the guest virtual hard disk
Returns a reference to a reader for the backing qcow file, if such a backing file exists.
Get the size of a cluster within the qcow
Get the number of cluster bits present in the underlying reader
Trait Implementations
Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Like read
, except that it reads into a slice of buffers. Read more
can_vector
)Determines if this Read
er has an efficient read_vectored
implementation. Read more
read_initializer
)Determines if this Read
er can work with buffers of uninitialized
memory. Read more
Read all bytes until EOF in this source, placing them into buf
. Read more
Read all bytes until EOF in this source, appending them to buf
. Read more
Read the exact number of bytes required to fill buf
. Read more
Creates a “by reference” adapter for this instance of Read
. Read more
Creates an adapter which will chain this stream with another. Read more
Auto Trait Implementations
impl<'qcow, 'reader, R> RefUnwindSafe for Reader<'qcow, 'reader, R> where
R: RefUnwindSafe,
impl<'qcow, 'reader, R> !UnwindSafe for Reader<'qcow, 'reader, R>
Blanket Implementations
Read the given type from the reader using the given endianness.
Read the given type from the reader with big endian byteorder
Read the given type from the reader with little endian byteorder
Read the given type from the reader with the native byteorder
Read T
from the reader with the given byte order and arguments.
Read T
from the reader, assuming big-endian byte order, using the
given arguments. Read more
Read T
from the reader, assuming little-endian byte order, using the
given arguments. Read more
Mutably borrows from an owned value. Read more