[−][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<&Term<Self::TermData>>>
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<&Term<T>>) -> bool where
T: TermData,
T: TermData,
Check whether this matcher matches g
.
Implementations on Foreign Types
impl<'_, U> GraphNameMatcher for Option<&'_ Term<U>> where
U: TermData,
[src]
U: TermData,
type TermData = U
fn constant(&self) -> Option<Option<&Term<Self::TermData>>>
[src]
fn matches<T>(&self, g: Option<&Term<T>>) -> bool where
T: TermData,
[src]
T: TermData,
impl<U> GraphNameMatcher for Option<Term<U>> where
U: TermData,
[src]
U: TermData,
type TermData = U
fn constant(&self) -> Option<Option<&Term<Self::TermData>>>
[src]
fn matches<T>(&self, g: Option<&Term<T>>) -> bool where
T: TermData,
[src]
T: TermData,
impl<M> GraphNameMatcher for [M] where
M: GraphNameMatcher,
[src]
M: GraphNameMatcher,
type TermData = M::TermData
fn constant(&self) -> Option<Option<&Term<Self::TermData>>>
[src]
fn matches<T>(&self, g: Option<&Term<T>>) -> bool where
T: TermData,
[src]
T: TermData,
impl<M> GraphNameMatcher for Vec<M> where
M: GraphNameMatcher,
[src]
M: GraphNameMatcher,
This is somewhat redundant with [M],
but it is useful with Dataset::union_graph
,
were a matcher must be moved rather than borrowed.
type TermData = M::TermData
fn constant(&self) -> Option<Option<&Term<Self::TermData>>>
[src]
fn matches<T>(&self, g: Option<&Term<T>>) -> bool where
T: TermData,
[src]
T: TermData,
Implementors
impl GraphNameMatcher for AnyTerm
[src]
type TermData = &'static str
fn constant(&self) -> Option<Option<&Term<Self::TermData>>>
[src]
fn matches<T>(&self, _g: Option<&Term<T>>) -> bool where
T: TermData,
[src]
T: TermData,
impl<F: Fn(Option<&Term<&str>>) -> bool> GraphNameMatcher for F
[src]
type TermData = &'static str
fn constant(&self) -> Option<Option<&Term<Self::TermData>>>
[src]
fn matches<T>(&self, g: Option<&Term<T>>) -> bool where
T: TermData,
[src]
T: TermData,
impl<U> GraphNameMatcher for Term<U> where
U: TermData,
[src]
U: TermData,