Trait pod::PodReadExt
[−]
[src]
pub trait PodReadExt {
fn read_pod<P: Pod>(&mut self) -> Result<P>;
fn read_pod_or_none<P: Pod>(&mut self) -> Result<Option<P>>;
}An extension trait for reading Pod types from std::io::Read data streams.
Required Methods
fn read_pod<P: Pod>(&mut self) -> Result<P>
Reads a Pod struct from the stream. Behaves like read_exact, and will
produce an error if EOF is encountered before the data is fully read.
fn read_pod_or_none<P: Pod>(&mut self) -> Result<Option<P>>
Reads a Pod struct from the stream, or nothing at EOF. Partial reads
will result in an error.
Implementors
impl<T: Read> PodReadExt for T