pub trait Parsable<S: TexlangState>: Sized {
// Required method
fn parse_impl(input: &mut ExpandedStream<S>) -> Result<Self, Box<Error>>;
// Provided method
fn parse<I>(input: &mut I) -> Result<Self, Box<Error>>
where I: AsMut<ExpandedStream<S>> { ... }
}
Expand description
Implementations of this trait are elements of the TeX grammar than can be parsed from a stream of tokens.
Required Methods§
sourcefn parse_impl(input: &mut ExpandedStream<S>) -> Result<Self, Box<Error>>
fn parse_impl(input: &mut ExpandedStream<S>) -> Result<Self, Box<Error>>
Parses a value from the vm::ExpandedStream.
Provided Methods§
sourcefn parse<I>(input: &mut I) -> Result<Self, Box<Error>>where
I: AsMut<ExpandedStream<S>>,
fn parse<I>(input: &mut I) -> Result<Self, Box<Error>>where I: AsMut<ExpandedStream<S>>,
Parses a value from an input stream.
This method just delegates to Parsable::parse_impl.