pub trait ReadInto<T>: BufReadExt {
type Error: Error;
// Required methods
fn try_read(&mut self) -> Result<T, Self::Error>;
fn try_read_n(&mut self, n: usize) -> Result<Vec<T>, Self::Error>;
fn try_read_m_n(
&mut self,
m: usize,
n: usize,
) -> Result<Mat<T>, Self::Error>;
// Provided methods
fn read(&mut self) -> T { ... }
fn read_n(&mut self, n: usize) -> Vec<T> { ... }
fn read_m_n(&mut self, m: usize, n: usize) -> Mat<T> { ... }
}Expand description
The opposite of ReadFrom.
Required Associated Types§
Sourcetype Error: Error
type Error: Error
Errors that come from ReadOneFrom.
This is usually ReadError.
Required Methods§
Provided Methods§
Sourcefn read(&mut self) -> T
fn read(&mut self) -> T
Unwrap the result of ReadInto::try_read.
Sourcefn read_n(&mut self, n: usize) -> Vec<T>
fn read_n(&mut self, n: usize) -> Vec<T>
Unwrap the result of ReadInto::try_read_n.