pub trait ReadOneInto<T> {
type Error: Error + From<StreamError>;
Show 14 methods
// Required methods
fn try_read_one(&mut self) -> Result<T, Self::Error>;
fn try_read_in_char(&mut self) -> Result<T, Self::Error>;
fn try_read_in_line_trimmed(&mut self) -> Result<T, Self::Error>;
fn try_read_in_line_some_trimmed(&mut self) -> Result<T, Self::Error>;
fn try_read_all(&mut self) -> Result<Vec<T>, Self::Error>;
fn try_read_any_in_line(&mut self) -> Result<Vec<T>, Self::Error>;
fn try_read_some_in_line(&mut self) -> Result<Vec<T>, Self::Error>;
// Provided methods
fn read_one(&mut self) -> T { ... }
fn read_in_char(&mut self) -> T { ... }
fn read_in_line_trimmed(&mut self) -> T { ... }
fn read_in_line_some_trimmed(&mut self) -> T { ... }
fn read_all(&mut self) -> Vec<T> { ... }
fn read_any_in_line(&mut self) -> Vec<T> { ... }
fn read_some_in_line(&mut self) -> Vec<T> { ... }
}Expand description
The opposite of ReadOneFrom.
Required Associated Types§
Required Methods§
Sourcefn try_read_one(&mut self) -> Result<T, Self::Error>
fn try_read_one(&mut self) -> Result<T, Self::Error>
Read one from self and parse into T.
Sourcefn try_read_in_char(&mut self) -> Result<T, Self::Error>
fn try_read_in_char(&mut self) -> Result<T, Self::Error>
Read an element in a single non-whitespace character from self, parse into T.
Sourcefn try_read_in_line_trimmed(&mut self) -> Result<T, Self::Error>
fn try_read_in_line_trimmed(&mut self) -> Result<T, Self::Error>
Read an element in the remained line from self, parse into T.
Sourcefn try_read_in_line_some_trimmed(&mut self) -> Result<T, Self::Error>
fn try_read_in_line_some_trimmed(&mut self) -> Result<T, Self::Error>
Read an element in a single trimmed line that is not empty from self, parse into T.
Sourcefn try_read_all(&mut self) -> Result<Vec<T>, Self::Error>
fn try_read_all(&mut self) -> Result<Vec<T>, Self::Error>
Read all remaining elements from stream.
Sourcefn try_read_any_in_line(&mut self) -> Result<Vec<T>, Self::Error>
fn try_read_any_in_line(&mut self) -> Result<Vec<T>, Self::Error>
Read all elements in current line from self.
Sourcefn try_read_some_in_line(&mut self) -> Result<Vec<T>, Self::Error>
fn try_read_some_in_line(&mut self) -> Result<Vec<T>, Self::Error>
Read all elements in a non-empty line from self.
Provided Methods§
Sourcefn read_one(&mut self) -> T
fn read_one(&mut self) -> T
Unwrap the result of ReadOneInto::try_read_one.
Sourcefn read_in_char(&mut self) -> T
fn read_in_char(&mut self) -> T
Unwrap the result of ReadOneInto::try_read_in_char.
Sourcefn read_in_line_trimmed(&mut self) -> T
fn read_in_line_trimmed(&mut self) -> T
Unwrap the result of ReadOneInto::try_read_in_line_trimmed.
Sourcefn read_in_line_some_trimmed(&mut self) -> T
fn read_in_line_some_trimmed(&mut self) -> T
Unwrap the result of ReadOneInto::try_read_in_line_some_trimmed.
Sourcefn read_all(&mut self) -> Vec<T>
fn read_all(&mut self) -> Vec<T>
Unwrap the result of ReadOneInto::try_read_all.
Sourcefn read_any_in_line(&mut self) -> Vec<T>
fn read_any_in_line(&mut self) -> Vec<T>
Unwrap the result of ReadOneInto::try_read_any_in_line.
Sourcefn read_some_in_line(&mut self) -> Vec<T>
fn read_some_in_line(&mut self) -> Vec<T>
Unwrap the result of ReadOneInto::try_read_some_in_line.