Trait sophia_api::term::matcher::GraphNameMatcher
source · pub trait GraphNameMatcher {
type Term: Term + ?Sized;
// Required method
fn matches<T2: Term + ?Sized>(&self, graph_name: GraphName<&T2>) -> bool;
// Provided methods
fn constant(&self) -> Option<GraphName<&Self::Term>> { ... }
fn matcher_ref(&self) -> MatcherRef<'_, Self> { ... }
}
Expand description
Generic trait for matching GraphName
s.
Required Associated Types§
Required Methods§
Provided Methods§
sourcefn constant(&self) -> Option<GraphName<&Self::Term>>
fn constant(&self) -> Option<GraphName<&Self::Term>>
Return None
, unless this matcher can only match a single graph name,
in which case this method may return that graph name.
This method is provided for optimization purposes, so implementing it is optional.
sourcefn matcher_ref(&self) -> MatcherRef<'_, Self>
fn matcher_ref(&self) -> MatcherRef<'_, Self>
Return a GraphNameMatcher
that is actually just a reference to this one.
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl GraphNameMatcher for Option<TermKind>
impl GraphNameMatcher for Option<TermKind>
source§impl<S, P, O> GraphNameMatcher for Option<(S, P, O)>
impl<S, P, O> GraphNameMatcher for Option<(S, P, O)>
Matches only embedded triple whose components match the corresponding matchers.