Skip to main content

NlError

Enum NlError 

Source
pub enum NlError {
Show 17 variants Preprocess(PreprocessError), Extractor(ExtractorError), Classifier(ClassifierError), Assembler(AssemblerError), Validator(ValidatorError), Cache(CacheError), Config(String), Io(Error), ModelDirNotFound(String), ChecksumMismatch { file: String, expected: String, actual: String, }, ChecksumsMissing, ChecksummedFileMissing(String), OnnxRuntimeMissing { hint: String, }, ManifestSha256Mismatch { file: String, expected: String, actual: String, }, ManifestParseFailed(Error), DownloadDisabled, DownloadFailed(String),
}
Expand description

Top-level error type for sqry-nl operations.

Variants§

§

Preprocess(PreprocessError)

Preprocessing failed (Unicode normalization, input validation)

§

Extractor(ExtractorError)

Entity extraction failed

§

Classifier(ClassifierError)

Intent classification failed

§

Assembler(AssemblerError)

Command assembly failed

§

Validator(ValidatorError)

Validation failed (safety checks)

§

Cache(CacheError)

Cache operation failed

§

Config(String)

Configuration error

§

Io(Error)

I/O error

§

ModelDirNotFound(String)

Resolved model directory does not exist on disk.

§

ChecksumMismatch

Checksum of an on-disk model file does not match the manifest.

Fields

§file: String
§expected: String
§actual: String
§

ChecksumsMissing

checksums.json (or equivalent integrity manifest) is absent from the model directory.

§

ChecksummedFileMissing(String)

A file referenced by the integrity manifest is missing from the model directory.

§

OnnxRuntimeMissing

ONNX Runtime shared library could not be loaded at runtime.

Fields

§hint: String

Operator-facing remediation hint (populated in NL08).

§

ManifestSha256Mismatch

Top-level manifest SHA-256 does not match the expected pinned value.

Raised by NL03’s downloader when the streaming SHA-256 computed over the freshly downloaded archive bytes does not match the manifest.json.sha256 value baked into the binary. Always fatal — there is no --allow-unverified-model opt-out for tampering on a trusted-mode payload.

Fields

§file: String

The archive file name from the manifest (e.g. sqry-models-v1.0.0.tar.gz).

§expected: String

SHA-256 hex from the trusted baked-in manifest.

§actual: String

SHA-256 hex computed over the on-the-wire bytes.

§

ManifestParseFailed(Error)

Model manifest could not be parsed as JSON.

§

DownloadDisabled

Network download was attempted but allow_model_download is false.

§

DownloadFailed(String)

Network download failed (transport, HTTP status, or post-fetch I/O).

Trait Implementations§

Source§

impl Debug for NlError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for NlError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for NlError

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<AssemblerError> for NlError

Source§

fn from(source: AssemblerError) -> Self

Converts to this type from the input type.
Source§

impl From<CacheError> for NlError

Source§

fn from(source: CacheError) -> Self

Converts to this type from the input type.
Source§

impl From<ClassifierError> for NlError

Source§

fn from(err: ClassifierError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for NlError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for NlError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ExtractorError> for NlError

Source§

fn from(source: ExtractorError) -> Self

Converts to this type from the input type.
Source§

impl From<PreprocessError> for NlError

Source§

fn from(source: PreprocessError) -> Self

Converts to this type from the input type.
Source§

impl From<ValidatorError> for NlError

Source§

fn from(source: ValidatorError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more