Skip to main content

ParsableRecursive

Trait ParsableRecursive 

Source
pub trait ParsableRecursive<R> {
    type Prefix: Parse;
    type Base: Parse;
    type Suffix: Parse;
    type Infix: Parse;

    // Required methods
    fn join_prefix(prefix: Self::Prefix, root: R, parser: &mut Parser) -> Self;
    fn from_base(base: Self::Base, parser: &mut Parser) -> Self;
    fn join_suffix(root: R, suffix: Self::Suffix, parser: &mut Parser) -> Self;
    fn join_infix(
        lhs: R,
        infix: Self::Infix,
        rhs: R,
        parser: &mut Parser,
    ) -> Self;
}
Expand description

Recursive type

Required Associated Types§

Source

type Prefix: Parse

The prefix for this type

Source

type Base: Parse

Base type

Source

type Suffix: Parse

The suffix for this type

Source

type Infix: Parse

The infix of this type

Required Methods§

Source

fn join_prefix(prefix: Self::Prefix, root: R, parser: &mut Parser) -> Self

Creates this type from it’s parts

Source

fn from_base(base: Self::Base, parser: &mut Parser) -> Self

Converts the base to this type

Source

fn join_suffix(root: R, suffix: Self::Suffix, parser: &mut Parser) -> Self

Creates this type from it’s parts

Source

fn join_infix(lhs: R, infix: Self::Infix, rhs: R, parser: &mut Parser) -> Self

Creates this type from it’s parts

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<R> ParsableRecursive<R> for !

Source§

type Base = !

Source§

type Infix = !

Source§

type Prefix = !

Source§

type Suffix = !

Source§

fn join_prefix(prefix: Self::Prefix, _: R, _parser: &mut Parser) -> Self

Source§

fn from_base(base: Self::Base, _parser: &mut Parser) -> Self

Source§

fn join_suffix(_: R, suffix: Self::Suffix, _parser: &mut Parser) -> Self

Source§

fn join_infix(_: R, infix: Self::Infix, _: R, _parser: &mut Parser) -> Self

Implementors§