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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so 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.