Skip to main content

WordExt

Trait WordExt 

Source
pub trait WordExt<'a>: Word {
    // Provided methods
    fn parse_one(stream: &mut InstructionStream<'a>) -> ParseResult<Self> { ... }
    fn parse_optional(
        stream: &mut InstructionStream<'a>,
    ) -> ParseResult<Option<Self>> { ... }
    fn parse_eos(stream: &mut InstructionStream<'a>) -> ParseResult<&'a [Self]> { ... }
}
Expand description

An extension auto-trait for Word.

Provided Methods§

Source

fn parse_one(stream: &mut InstructionStream<'a>) -> ParseResult<Self>

Parses one word.

Source

fn parse_optional( stream: &mut InstructionStream<'a>, ) -> ParseResult<Option<Self>>

Tries to optionally parse one word.

Source

fn parse_eos(stream: &mut InstructionStream<'a>) -> ParseResult<&'a [Self]>

Parses words until the end of the stream.

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.

Implementors§

Source§

impl<'a, T: Word> WordExt<'a> for T