[][src]Trait cfg::ContextFreeRef

pub trait ContextFreeRef<'a>: Deref + Sized where
    Self::Target: ContextFree
{ type RuleRef: GrammarRule<History = <Self::Target as RuleContainer>::History> + Copy + 'a; type Rules: Iterator<Item = Self::RuleRef>; fn rules(self) -> Self::Rules; fn reverse(self) -> Self::Target
    where
        <Self::Target as RuleContainer>::History: Clone,
        Self::Target: EmptyRuleContainer
, { ... } }

This trait is currently needed to make the associated Rules iterator generic over a lifetime parameter.

Associated Types

type RuleRef: GrammarRule<History = <Self::Target as RuleContainer>::History> + Copy + 'a

Immutable reference to a rule.

type Rules: Iterator<Item = Self::RuleRef>

Iterator over immutable references to the grammar's rules.

Loading content...

Required methods

fn rules(self) -> Self::Rules

Returns an iterator over immutable references to the grammar's rules.

Loading content...

Provided methods

fn reverse(self) -> Self::Target where
    <Self::Target as RuleContainer>::History: Clone,
    Self::Target: EmptyRuleContainer

Reverses the grammar.

Loading content...

Implementors

impl<'a> ContextFreeRef<'a> for &'a BinarizedGrammar[src]

type RuleRef = RuleRef<'a, History>

type Rules = BinarizedRules<'a, History>

impl<'a, H> ContextFreeRef<'a> for &'a BinarizedCfg<H> where
    H: Binarize + 'a, 
[src]

type RuleRef = RuleRef<'a, H>

type Rules = BinarizedRules<'a, H>

impl<'a, H, Hs> ContextFreeRef<'a> for &'a Cfg<H, Hs> where
    H: 'a,
    Hs: Clone + RewriteSequence<Rewritten = H>, 
[src]

type RuleRef = <Self::Rules as Iterator>::Item

type Rules = Iter<'a, Rule<H>>

Loading content...