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§
type Rule: RuleEvents + ?Sized
Required Methods§
fn iter_rules<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Self::Rule> + 'a>
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".