pub enum NativeError {
Show 13 variants
Http(Error),
Io(Error),
ModelNotFound {
repo: String,
filename: String,
},
ChecksumMismatch {
path: PathBuf,
expected: String,
actual: String,
},
InvalidConfig(String),
Interrupted(String),
StorageDir(String),
Json(Error),
ModelNotLoaded,
InferenceFailed(String),
UnsupportedArchitecture(String),
DeviceError(String),
TokenizerError(String),
}Expand description
Errors that can occur in spn-native operations.
Variants§
Http(Error)
HTTP request failed.
Io(Error)
I/O error.
ModelNotFound
Model not found on HuggingFace.
ChecksumMismatch
Checksum verification failed.
InvalidConfig(String)
Invalid model configuration.
Interrupted(String)
Download was interrupted.
StorageDir(String)
Storage directory error.
Json(Error)
JSON parsing error.
ModelNotLoaded
Model not loaded.
InferenceFailed(String)
Inference failed.
Reserved for detailed inference error reporting (e.g., OOM, timeout).
UnsupportedArchitecture(String)
Unsupported model architecture.
Reserved for architecture validation when loading models.
DeviceError(String)
Device error (GPU/CPU).
Reserved for GPU/CPU device selection and error handling.
TokenizerError(String)
Tokenizer error.
Reserved for custom tokenizer support.
Trait Implementations§
Source§impl Debug for NativeError
impl Debug for NativeError
Source§impl Display for NativeError
impl Display for NativeError
Source§impl Error for NativeError
impl Error for NativeError
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 NativeError
impl From<Error> for NativeError
Source§impl From<Error> for NativeError
impl From<Error> for NativeError
Source§impl From<Error> for NativeError
impl From<Error> for NativeError
Source§impl From<NativeError> for BackendError
impl From<NativeError> for BackendError
Source§fn from(err: NativeError) -> Self
fn from(err: NativeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NativeError
impl !RefUnwindSafe for NativeError
impl Send for NativeError
impl Sync for NativeError
impl Unpin for NativeError
impl UnsafeUnpin for NativeError
impl !UnwindSafe for NativeError
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
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.