pub enum AnalysisError {
Show 19 variants
Memory(MemoryError),
Descriptor(&'static str),
DescriptorRevision {
component: &'static str,
expected: u32,
actual: u32,
},
DescriptorFingerprint {
expected: AnalyzerFingerprint,
actual: AnalyzerFingerprint,
},
ResourceLimit {
resource: &'static str,
required: usize,
limit: usize,
},
Json(Error),
Cancelled,
UnpairedTokenSurrogate {
unit: u16,
},
MismatchedAnalysisInput {
expected_utf16: usize,
actual_utf16: usize,
},
InvalidTextOffset {
coordinate: &'static str,
offset: usize,
length: usize,
},
InvalidTextSpan {
start: usize,
end: usize,
},
OverlappingTextEdits,
MissingTokenOffsets,
InvalidTokenPosition,
TokenPositionOverflow,
InvalidRegex {
component: &'static str,
pattern: String,
source: Error,
},
BuiltInRegex {
component: &'static str,
message: String,
},
InvalidGramBounds {
component: &'static str,
min_gram: usize,
max_gram: usize,
},
SynonymFile(SynonymFileError),
}Expand description
An invalid analyzer is an execution error, never an empty token stream.
Variants§
Memory(MemoryError)
Descriptor(&'static str)
DescriptorRevision
DescriptorFingerprint
ResourceLimit
Json(Error)
Cancelled
UnpairedTokenSurrogate
MismatchedAnalysisInput
InvalidTextOffset
InvalidTextSpan
OverlappingTextEdits
MissingTokenOffsets
InvalidTokenPosition
TokenPositionOverflow
InvalidRegex
BuiltInRegex
InvalidGramBounds
SynonymFile(SynonymFileError)
Trait Implementations§
Source§impl Debug for AnalysisError
impl Debug for AnalysisError
Source§impl Display for AnalysisError
impl Display for AnalysisError
Source§impl Error for AnalysisError
impl Error for AnalysisError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for AnalysisError
impl From<Error> for AnalysisError
Source§impl From<MemoryError> for AnalysisError
impl From<MemoryError> for AnalysisError
Source§fn from(source: MemoryError) -> Self
fn from(source: MemoryError) -> Self
Converts to this type from the input type.
Source§impl From<SynonymFileError> for AnalysisError
impl From<SynonymFileError> for AnalysisError
Source§fn from(source: SynonymFileError) -> Self
fn from(source: SynonymFileError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for AnalysisError
impl !UnwindSafe for AnalysisError
impl Freeze for AnalysisError
impl Send for AnalysisError
impl Sync for AnalysisError
impl Unpin for AnalysisError
impl UnsafeUnpin for AnalysisError
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
Mutably borrows from an owned value. Read more