souper_ir::parse

Trait Parse

Source
pub trait Parse: Sized {
    // Required method
    fn parse<'a>(parser: &mut Parser<'a>) -> Result<Self>;
}
Expand description

A trait for AST nodes that can be parsed from text.

Required Methods§

Source

fn parse<'a>(parser: &mut Parser<'a>) -> Result<Self>

Parse a Self from the given buffer.

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.

Implementations on Foreign Types§

Source§

impl<P> Parse for Option<P>
where P: Peek + Parse,

Source§

fn parse<'a>(parser: &mut Parser<'a>) -> Result<Self>

Source§

impl<P> Parse for Vec<P>
where P: Peek + Parse,

Source§

fn parse<'a>(parser: &mut Parser<'a>) -> Result<Self>

Implementors§