[][src]Trait sophia_term::matcher::GraphNameMatcher

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

Generic trait for matching graph names, i.e. optional terms.

Associated Types

type Term: TTerm + ?Sized

Type of TTerm used internally by this matcher.

Loading content...

Required methods

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

If this matcher matches only one graph name, return it, else None.

NB: a graph name is already an Option, None meaning the (unnamed) default graph. As a consequence, this methods returns an option of option :

  • None means that the matcher does not match a single graph name,
  • Some(None) means that the matcher matches only the default graph,
  • Some(Some(term)) means that the matcher matches a single proper graph name.

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

Check whether this matcher matches g.

Loading content...

Implementations on Foreign Types

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

type Term = U

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

type Term = U

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

type Term = U

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

type Term = U

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

type Term = U

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

type Term = SimpleIri<'static>

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

type Term = U

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

type Term = U

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

type Term = U

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

type Term = U

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

type Term = U

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

type Term = U

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

type Term = U

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

type Term = U

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

type Term = U

Loading content...

Implementors

impl GraphNameMatcher for AnyTerm[src]

type Term = SimpleIri<'static>

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

type Term = U

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

type Term = U

Loading content...