Skip to main content

Ruleset

Trait Ruleset 

Source
pub trait Ruleset<Q, A>: RawRuleset<Q, A>
where Q: RawState, Self::Rule: Instruction<Q, A, Head = Head<Q, A>, Tail = Tail<Q, A>>,
{ // Required methods fn find_tail(&self, state: State<&Q>, sym: &A) -> Option<&Tail<Q, A>>; fn get(&self, head: &Head<Q, A>) -> Option<&Tail<Q, A>>; // Provided method fn find_head(&self, _: Head<&Q, &A>) -> Option<&Tail<Q, A>> { ... } }

Required Methods§

Source

fn find_tail(&self, state: State<&Q>, sym: &A) -> Option<&Tail<Q, A>>

Source

fn get(&self, head: &Head<Q, A>) -> Option<&Tail<Q, A>>

Provided Methods§

Source

fn find_head(&self, _: Head<&Q, &A>) -> Option<&Tail<Q, A>>

Implementations on Foreign Types§

Source§

impl<I, Q, A> Ruleset<Q, A> for &[I]
where Q: RawState + PartialEq, A: PartialEq, I: Instruction<Q, A, Head = Head<Q, A>, Tail = Tail<Q, A>>,

Source§

fn get(&self, head: &Head<Q, A>) -> Option<&Tail<Q, A>>

Source§

fn find_tail(&self, state: State<&Q>, sym: &A) -> Option<&Tail<Q, A>>

Source§

impl<I, Q, A> Ruleset<Q, A> for &mut [I]
where Q: RawState + PartialEq, A: PartialEq, I: Instruction<Q, A, Head = Head<Q, A>, Tail = Tail<Q, A>>,

Source§

fn get(&self, head: &Head<Q, A>) -> Option<&Tail<Q, A>>

Source§

fn find_tail(&self, state: State<&Q>, sym: &A) -> Option<&Tail<Q, A>>

Source§

impl<I, Q, A> Ruleset<Q, A> for [I]
where Q: RawState + PartialEq, A: PartialEq, I: Instruction<Q, A, Head = Head<Q, A>, Tail = Tail<Q, A>>,

Source§

fn get(&self, head: &Head<Q, A>) -> Option<&Tail<Q, A>>

Source§

fn find_tail(&self, state: State<&Q>, sym: &A) -> Option<&Tail<Q, A>>

Source§

impl<I, Q, A> Ruleset<Q, A> for BTreeSet<I>
where Q: RawState + PartialEq, A: PartialEq, I: Instruction<Q, A, Head = Head<Q, A>, Tail = Tail<Q, A>>,

Source§

fn get(&self, head: &Head<Q, A>) -> Option<&Tail<Q, A>>

Source§

fn find_tail(&self, state: State<&Q>, sym: &A) -> Option<&Tail<Q, A>>

Source§

impl<I, Q, A> Ruleset<Q, A> for Vec<I>
where Q: RawState + PartialEq, A: PartialEq, I: Instruction<Q, A, Head = Head<Q, A>, Tail = Tail<Q, A>>,

Source§

fn get(&self, head: &Head<Q, A>) -> Option<&Tail<Q, A>>

Source§

fn find_tail(&self, state: State<&Q>, sym: &A) -> Option<&Tail<Q, A>>

Source§

impl<Q, A> Ruleset<Q, A> for BTreeMap<Head<Q, A>, Tail<Q, A>>
where Q: RawState + Ord, A: Ord,

Source§

fn get(&self, head: &Head<Q, A>) -> Option<&Tail<Q, A>>

Source§

fn find_tail(&self, state: State<&Q>, sym: &A) -> Option<&Tail<Q, A>>

Source§

impl<Q, A> Ruleset<Q, A> for HashMap<Head<Q, A>, Tail<Q, A>>
where Q: RawState + Eq + Hash, A: Eq + Hash,

Source§

fn get(&self, head: &Head<Q, A>) -> Option<&Tail<Q, A>>

Source§

fn find_tail(&self, state: State<&Q>, sym: &A) -> Option<&Tail<Q, A>>

Source§

impl<Q, A> Ruleset<Q, A> for HashSet<Rule<Q, A>>
where Q: RawState + Eq + Hash, A: Eq + Hash,

Source§

fn get(&self, head: &Head<Q, A>) -> Option<&Tail<Q, A>>

Source§

fn find_tail(&self, state: State<&Q>, sym: &A) -> Option<&Tail<Q, A>>

Source§

impl<const N: usize, I, Q, A> Ruleset<Q, A> for [I; N]
where Q: RawState + PartialEq, A: PartialEq, I: Instruction<Q, A, Head = Head<Q, A>, Tail = Tail<Q, A>>,

Source§

fn get(&self, head: &Head<Q, A>) -> Option<&Tail<Q, A>>

Source§

fn find_tail(&self, state: State<&Q>, sym: &A) -> Option<&Tail<Q, A>>

Implementors§