pub trait Parse: Sized {
type Error;
// Required method
fn parse(input: &mut impl Read) -> Result<Self, Self::Error>;
// Provided method
fn parse_multi<T>(
input: &mut impl Read,
count: usize,
) -> Result<T, Self::Error>
where T: FromIterator<Self> { ... }
}
Expand description
Interface for parsing a value from a Read
input.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn parse_multi<T>(input: &mut impl Read, count: usize) -> Result<T, Self::Error>where
T: FromIterator<Self>,
fn parse_multi<T>(input: &mut impl Read, count: usize) -> Result<T, Self::Error>where
T: FromIterator<Self>,
Parses multiple values of this type from the input into a Vec
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.