#[non_exhaustive]pub enum FtsIndexError<E: Display> {
SurrogateOutOfRange {
surrogate: Surrogate,
},
TermTooLong {
len: usize,
max: usize,
},
InvalidQuery(InvalidQuery),
Backend(E),
Segment(SegmentError),
BudgetExhausted(MemError),
}Expand description
Errors returned by FtsIndex write operations.
E is the backend error type (B::Error). Backend errors are wrapped in
FtsIndexError::Backend so callers get a single error type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SurrogateOutOfRange
The supplied Surrogate is outside the indexable range 1..=MAX_INDEXABLE_SURROGATE.
Either the zero sentinel (Surrogate::ZERO, meaning “not yet assigned”)
or a value at u32::MAX was passed to index_document. The Control
Plane surrogate allocator must ensure surrogates are in range before
dispatching indexing operations.
TermTooLong
A term in the document exceeds the on-disk u16 length cap.
The FTS segment format encodes term lengths as u16 (see
lsm/segment/format.rs::MAX_TERM_LEN). Terms longer than
u16::MAX (65 535 bytes) cannot be persisted. After analysis,
real-world terms are typically 2-20 bytes — exceeding this cap
indicates a malformed analyzer or adversarial input.
InvalidQuery(InvalidQuery)
The FTS query string is invalid (e.g. NOT-only, unsupported parentheses).
Backend(E)
An underlying backend storage operation failed.
Segment(SegmentError)
A segment I/O or validation error not otherwise classified.
Read-side variants (BadMagic, UnsupportedVersion, ChecksumMismatch,
Truncated) are not expected on the write/flush path but are propagated
here rather than panicking, so corrupt-state surprises surface as typed
errors at the public API boundary.
BudgetExhausted(MemError)
Memory budget exhausted for the FTS engine.
The operation requires more memory than the engine’s remaining budget allows. Callers should backpressure, spill, or reject the request.
Trait Implementations§
Source§impl<E> Display for FtsIndexError<E>
impl<E> Display for FtsIndexError<E>
Source§impl<E: Display> Error for FtsIndexError<E>
impl<E: Display> Error for FtsIndexError<E>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl<E: Display> From<InvalidQuery> for FtsIndexError<E>
impl<E: Display> From<InvalidQuery> for FtsIndexError<E>
Source§fn from(source: InvalidQuery) -> Self
fn from(source: InvalidQuery) -> Self
Source§impl<E: Display> From<SegmentError> for FtsIndexError<E>
impl<E: Display> From<SegmentError> for FtsIndexError<E>
Source§fn from(err: SegmentError) -> Self
fn from(err: SegmentError) -> Self
Auto Trait Implementations§
impl<E> Freeze for FtsIndexError<E>where
E: Freeze,
impl<E> RefUnwindSafe for FtsIndexError<E>where
E: RefUnwindSafe,
impl<E> Send for FtsIndexError<E>where
E: Send,
impl<E> Sync for FtsIndexError<E>where
E: Sync,
impl<E> Unpin for FtsIndexError<E>where
E: Unpin,
impl<E> UnsafeUnpin for FtsIndexError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for FtsIndexError<E>where
E: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.