[][src]Trait sophia_term::matcher::TermMatcher

pub trait TermMatcher {
    type Term: TTerm + ?Sized;
    fn constant(&self) -> Option<&Self::Term>;
fn matches<T>(&self, t: &T) -> bool
    where
        T: TTerm + ?Sized
; }

Generic trait for matching terms.

Associated Types

type Term: TTerm + ?Sized

Type of TTerm used internally by this matcher.

Loading content...

Required methods

fn constant(&self) -> Option<&Self::Term>

If this matcher matches only one term, return this term, else None.

fn matches<T>(&self, t: &T) -> bool where
    T: TTerm + ?Sized

Check whether this matcher matches t.

Loading content...

Implementations on Foreign Types

impl<'_, U> TermMatcher for [&'_ U; 9] where
    U: TTerm + ?Sized
[src]

type Term = U

impl<'_, U> TermMatcher for [&'_ U; 4] where
    U: TTerm + ?Sized
[src]

type Term = U

impl<F> TermMatcher for [F; 1] where
    F: Fn(&dyn TTerm) -> bool
[src]

type Term = SimpleIri<'static>

impl<'_, U> TermMatcher for [&'_ U; 3] where
    U: TTerm + ?Sized
[src]

type Term = U

impl<'_, U> TermMatcher for [&'_ U; 10] where
    U: TTerm + ?Sized
[src]

type Term = U

impl<'_, U> TermMatcher for [&'_ U; 11] where
    U: TTerm + ?Sized
[src]

type Term = U

impl<'_, U> TermMatcher for [&'_ U; 6] where
    U: TTerm + ?Sized
[src]

type Term = U

impl<'_, U> TermMatcher for [&'_ U; 5] where
    U: TTerm + ?Sized
[src]

type Term = U

impl<'_, U> TermMatcher for [&'_ U; 8] where
    U: TTerm + ?Sized
[src]

type Term = U

impl<'_, U> TermMatcher for [&'_ U] where
    U: TTerm + ?Sized
[src]

type Term = U

impl<'_, U> TermMatcher for [&'_ U; 2] where
    U: TTerm + ?Sized
[src]

type Term = U

impl<'_, U> TermMatcher for Vec<&'_ U> where
    U: TTerm + ?Sized
[src]

type Term = U

impl<'_, U> TermMatcher for [&'_ U; 12] where
    U: TTerm + ?Sized
[src]

type Term = U

impl<'_, U> TermMatcher for [&'_ U; 7] where
    U: TTerm + ?Sized
[src]

type Term = U

Loading content...

Implementors

impl TermMatcher for AnyTerm[src]

type Term = SimpleIri<'static>

impl<'a, U> TermMatcher for AnyOrExactlyRef<&'a U> where
    U: TTerm + ?Sized
[src]

type Term = U

impl<U> TermMatcher for AnyOrExactly<U> where
    U: TTerm
[src]

type Term = U

impl<U> TermMatcher for U where
    U: TTerm + ?Sized
[src]

type Term = U

Loading content...