Skip to main content

RulesContainer

Trait RulesContainer 

Source
pub trait RulesContainer {
    type Rule: RuleEvents + ?Sized;

    // Required method
    fn iter_rules<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Self::Rule> + 'a>;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Let the rules container provide the ability to iterate over all rules (abstracting only to the minimum necessary).

Required Associated Types§

Required Methods§

Source

fn iter_rules<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Self::Rule> + 'a>

Provided Methods§

Source

fn is_empty(&self) -> bool

Fast empty judgment for snapshots (fix missing rules.is_empty())

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§