[−][src]Trait sophia_term::matcher::GraphNameMatcher
Generic trait for matching graph names, i.e. optional terms.
Associated Types
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,
T: TTerm + ?Sized,
Check whether this matcher matches g
.
Implementations on Foreign Types
impl<'a, '_, U> GraphNameMatcher for [Option<&'_ U>; 9] where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(
&self
) -> Option<Option<&<[Option<&'_ U>; 9] as GraphNameMatcher>::Term>>
[src]
&self
) -> Option<Option<&<[Option<&'_ U>; 9] as GraphNameMatcher>::Term>>
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<'a, '_, U> GraphNameMatcher for [Option<&'_ U>; 8] where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(
&self
) -> Option<Option<&<[Option<&'_ U>; 8] as GraphNameMatcher>::Term>>
[src]
&self
) -> Option<Option<&<[Option<&'_ U>; 8] as GraphNameMatcher>::Term>>
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<'a, '_, U> GraphNameMatcher for [Option<&'_ U>; 6] where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(
&self
) -> Option<Option<&<[Option<&'_ U>; 6] as GraphNameMatcher>::Term>>
[src]
&self
) -> Option<Option<&<[Option<&'_ U>; 6] as GraphNameMatcher>::Term>>
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<'a, '_, U> GraphNameMatcher for [Option<&'_ U>; 5] where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(
&self
) -> Option<Option<&<[Option<&'_ U>; 5] as GraphNameMatcher>::Term>>
[src]
&self
) -> Option<Option<&<[Option<&'_ U>; 5] as GraphNameMatcher>::Term>>
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<'_, U> GraphNameMatcher for [Option<&'_ U>] where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(&self) -> Option<Option<&U>>
[src]
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<F> GraphNameMatcher for [F; 1] where
F: Fn(Option<&dyn TTerm>) -> bool,
[src]
F: Fn(Option<&dyn TTerm>) -> bool,
type Term = SimpleIri<'static>
fn constant(&self) -> Option<Option<&SimpleIri<'static>>>
[src]
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<'a, '_, U> GraphNameMatcher for [Option<&'_ U>; 4] where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(
&self
) -> Option<Option<&<[Option<&'_ U>; 4] as GraphNameMatcher>::Term>>
[src]
&self
) -> Option<Option<&<[Option<&'_ U>; 4] as GraphNameMatcher>::Term>>
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<'a, '_, U> GraphNameMatcher for [Option<&'_ U>; 7] where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(
&self
) -> Option<Option<&<[Option<&'_ U>; 7] as GraphNameMatcher>::Term>>
[src]
&self
) -> Option<Option<&<[Option<&'_ U>; 7] as GraphNameMatcher>::Term>>
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<'a, '_, U> GraphNameMatcher for [Option<&'_ U>; 2] where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(
&self
) -> Option<Option<&<[Option<&'_ U>; 2] as GraphNameMatcher>::Term>>
[src]
&self
) -> Option<Option<&<[Option<&'_ U>; 2] as GraphNameMatcher>::Term>>
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<'_, U> GraphNameMatcher for Option<&'_ U> where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(&self) -> Option<Option<&U>>
[src]
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<'a, '_, U> GraphNameMatcher for [Option<&'_ U>; 11] where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(
&self
) -> Option<Option<&<[Option<&'_ U>; 11] as GraphNameMatcher>::Term>>
[src]
&self
) -> Option<Option<&<[Option<&'_ U>; 11] as GraphNameMatcher>::Term>>
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<'a, '_, U> GraphNameMatcher for [Option<&'_ U>; 12] where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(
&self
) -> Option<Option<&<[Option<&'_ U>; 12] as GraphNameMatcher>::Term>>
[src]
&self
) -> Option<Option<&<[Option<&'_ U>; 12] as GraphNameMatcher>::Term>>
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<'_, U> GraphNameMatcher for Vec<Option<&'_ U>> where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(&self) -> Option<Option<&U>>
[src]
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<'a, '_, U> GraphNameMatcher for [Option<&'_ U>; 3] where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(
&self
) -> Option<Option<&<[Option<&'_ U>; 3] as GraphNameMatcher>::Term>>
[src]
&self
) -> Option<Option<&<[Option<&'_ U>; 3] as GraphNameMatcher>::Term>>
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<'a, '_, U> GraphNameMatcher for [Option<&'_ U>; 10] where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(
&self
) -> Option<Option<&<[Option<&'_ U>; 10] as GraphNameMatcher>::Term>>
[src]
&self
) -> Option<Option<&<[Option<&'_ U>; 10] as GraphNameMatcher>::Term>>
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
Implementors
impl GraphNameMatcher for AnyTerm
[src]
type Term = SimpleIri<'static>
fn constant(&self) -> Option<Option<&SimpleIri<'static>>>
[src]
fn matches<T>(&self, _g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<'a, U> GraphNameMatcher for AnyOrExactlyRef<Option<&'a U>> where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
fn constant(&self) -> Option<Option<&U>>
[src]
fn matches<T>(&self, g: Option<&T>) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<U> GraphNameMatcher for AnyOrExactly<Option<U>> where
U: TTerm,
[src]
U: TTerm,