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
; }
Expand description

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

Associated Types

Type of TTerm used internally by this matcher.

Required methods

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.

Check whether this matcher matches g.

Implementations on Foreign Types

Implementors