pub struct Linter { /* private fields */ }Expand description
The vocabulary index the linter validates against — the Bitmap Symbol Table’s key set, organised by
facet dimension so suggestions stay in-dimension (a bad geo/… is corrected against real geo/…).
Implementations§
Source§impl Linter
impl Linter
Sourcepub fn from_tokens<I: IntoIterator<Item = String>>(tokens: I) -> Linter
pub fn from_tokens<I: IntoIterator<Item = String>>(tokens: I) -> Linter
Build from the corpus’s vocabulary (all facet/value tokens).
Sourcepub fn with_numeric_fields<I: IntoIterator<Item = String>>(
self,
fields: I,
) -> Self
pub fn with_numeric_fields<I: IntoIterator<Item = String>>( self, fields: I, ) -> Self
Declare the corpus’s numeric fields so (num <field> …) predicates validate against the right
namespace.
pub fn numeric_fields(&self) -> Vec<String>
Sourcepub fn validate_atom(&self, atom: &str) -> AtomStatus
pub fn validate_atom(&self, atom: &str) -> AtomStatus
Validate one atom: exact, wildcard-coverage, or unknown-with-suggestions.
Sourcepub fn facet_names(&self) -> Vec<String>
pub fn facet_names(&self) -> Vec<String>
The corpus’s real facet names, sorted — what to show when a query names a dimension that does not exist here.
Sourcepub fn suggest(&self, atom: &str) -> Vec<String>
pub fn suggest(&self, atom: &str) -> Vec<String>
Nearest real terms to a miss, scoped to the atom’s own facet. Returns empty when the facet itself
is unknown — suggesting values from an unrelated dimension (artifact/power_cube →
state/negated) is worse than saying the dimension doesn’t exist, which lint reports instead.
Sourcepub fn lint(&self, ikl: &str) -> LintReport
pub fn lint(&self, ikl: &str) -> LintReport
Lint a full IKL expression: repair unbalanced parens, then validate every vocabulary atom.
Auto Trait Implementations§
impl Freeze for Linter
impl RefUnwindSafe for Linter
impl Send for Linter
impl Sync for Linter
impl Unpin for Linter
impl UnsafeUnpin for Linter
impl UnwindSafe for Linter
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more