Trait PushImpl

Source
pub trait PushImpl<Extra: Copy>: Sized {
    type Item: AstImpl<Extra>;

    // Required methods
    fn empty(with: Extra) -> Self;
    fn push(&mut self, value: Self::Item, with: Extra);

    // Provided method
    fn peggen_ast<'lifetime>(
        input: &'lifetime str,
        stack: &'lifetime [Tag],
        with: Extra,
    ) -> (&'lifetime [Tag], Self) { ... }
}

Required Associated Types§

Source

type Item: AstImpl<Extra>

Required Methods§

Source

fn empty(with: Extra) -> Self

Source

fn push(&mut self, value: Self::Item, with: Extra)

Provided Methods§

Source

fn peggen_ast<'lifetime>( input: &'lifetime str, stack: &'lifetime [Tag], with: Extra, ) -> (&'lifetime [Tag], Self)

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<'b, T: AstImpl<&'b Bump>> PushImpl<&'b Bump> for Vec<'b, T>

Source§

type Item = T

Source§

fn empty(with: &'b Bump) -> Self

Source§

fn push(&mut self, value: Self::Item, _: &'b Bump)

Source§

impl<T: AstImpl<Extra>, Extra: Copy> PushImpl<Extra> for Option<T>

Source§

type Item = T

Source§

fn empty(_: Extra) -> Self

Source§

fn push(&mut self, value: Self::Item, _: Extra)

Implementors§

Source§

impl<T: AstImpl<Extra>, Extra: Copy> PushImpl<Extra> for peggen_core::Vec<T>

Source§

type Item = T