ReadOneInto

Trait ReadOneInto 

Source
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§

Source

type Error: Error + From<StreamError>

Errors that come from ReadOneFrom.

This is usually ReadError.

Required Methods§

Source

fn try_read_one(&mut self) -> Result<T, Self::Error>

Read one from self and parse into T.

Source

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.

Source

fn try_read_in_line_trimmed(&mut self) -> Result<T, Self::Error>

Read an element in the remained line from self, parse into T.

Source

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.

Source

fn try_read_all(&mut self) -> Result<Vec<T>, Self::Error>

Read all remaining elements from stream.

Source

fn try_read_any_in_line(&mut self) -> Result<Vec<T>, Self::Error>

Read all elements in current line from self.

Source

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§

Source

fn read_one(&mut self) -> T

Unwrap the result of ReadOneInto::try_read_one.

Source

fn read_in_char(&mut self) -> T

Unwrap the result of ReadOneInto::try_read_in_char.

Source

fn read_in_line_trimmed(&mut self) -> T

Source

fn read_in_line_some_trimmed(&mut self) -> T

Source

fn read_all(&mut self) -> Vec<T>

Unwrap the result of ReadOneInto::try_read_all.

Source

fn read_any_in_line(&mut self) -> Vec<T>

Unwrap the result of ReadOneInto::try_read_any_in_line.

Source

fn read_some_in_line(&mut self) -> Vec<T>

Unwrap the result of ReadOneInto::try_read_some_in_line.

Implementors§