pub struct TextIndexScope {
pub graphs: TextIndexGraphs,
pub predicates: TextIndexPredicates,
}Expand description
What a text index covers: a graph scope and a predicate filter. The
Default is the pre-0.4.0 index — the default graph, every predicate —
and it is the one scope that writes no scope block.
Fields§
§graphs: TextIndexGraphsThe graphs whose literals are indexed.
predicates: TextIndexPredicatesThe predicates whose literals are indexed.
Implementations§
Source§impl TextIndexScope
impl TextIndexScope
Sourcepub fn from_options<I, E>(
graphs: TextIndexGraphs,
include: I,
exclude: E,
) -> Result<TextIndexScope, String>where
I: IntoIterator,
<I as IntoIterator>::Item: AsRef<str>,
E: IntoIterator,
<E as IntoIterator>::Item: AsRef<str>,
pub fn from_options<I, E>(
graphs: TextIndexGraphs,
include: I,
exclude: E,
) -> Result<TextIndexScope, String>where
I: IntoIterator,
<I as IntoIterator>::Item: AsRef<str>,
E: IntoIterator,
<E as IntoIterator>::Item: AsRef<str>,
Build a scope from the CLI’s spelling: a graph scope and predicate IRIs
to include or to exclude (bare or <…>). Giving both lists is an error —
an include list already says exactly what is indexed. Empty lists mean
every predicate.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
The pre-0.4.0 scope (default graph, every predicate) — written with no scope block.
Sourcepub fn restricts_predicates(&self) -> bool
pub fn restricts_predicates(&self) -> bool
Does the scope leave some predicate’s literals out? Such an index is
written under crate::header::SectionKind::TextIndexPartial so that
readers which do not know scopes never prune a filter with it.
Sourcepub fn covers_named_graphs(&self) -> bool
pub fn covers_named_graphs(&self) -> bool
Are the named graphs’ literals indexed too?
Sourcepub fn covers_predicate(&self, p: &str) -> bool
pub fn covers_predicate(&self, p: &str) -> bool
Are literals of predicate p (an N-Triples token <…>) indexed?
Sourcepub fn covers_pattern_predicate(&self, p: Option<&str>) -> bool
pub fn covers_pattern_predicate(&self, p: Option<&str>) -> bool
Does the index cover a triple pattern’s literals? p is the pattern’s
constant predicate, or None for a variable one — which can bind any
predicate, so only an every-predicate index covers it.
Sourcepub fn listed_predicates(&self) -> &[String]
pub fn listed_predicates(&self) -> &[String]
The predicate list of an include/exclude scope (empty for every-predicate).
Trait Implementations§
Source§impl Clone for TextIndexScope
impl Clone for TextIndexScope
Source§fn clone(&self) -> TextIndexScope
fn clone(&self) -> TextIndexScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TextIndexScope
impl Debug for TextIndexScope
Source§impl Default for TextIndexScope
impl Default for TextIndexScope
Source§fn default() -> TextIndexScope
fn default() -> TextIndexScope
impl Eq for TextIndexScope
Source§impl Hash for TextIndexScope
impl Hash for TextIndexScope
Source§impl IntoTextIndex for TextIndexScope
impl IntoTextIndex for TextIndexScope
Source§fn into_text_index(self) -> Option<TextIndexScope>
fn into_text_index(self) -> Option<TextIndexScope>
None = build no text index.Source§impl PartialEq for TextIndexScope
impl PartialEq for TextIndexScope
impl StructuralPartialEq for TextIndexScope
Auto Trait Implementations§
impl Forget for TextIndexScope
impl Freeze for TextIndexScope
impl Move for TextIndexScope
impl RefUnwindSafe for TextIndexScope
impl Send for TextIndexScope
impl Sync for TextIndexScope
impl Unpin for TextIndexScope
impl UnsafeUnpin for TextIndexScope
impl UnwindSafe for TextIndexScope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.