pub enum HfError {
Transport {
url: String,
message: String,
source: Box<dyn Error + Send + Sync>,
},
HttpStatus {
url: String,
status: u16,
body: String,
},
Io {
path: PathBuf,
message: String,
source: Error,
},
Json {
context: String,
source: Error,
},
Protocol {
url: String,
message: String,
},
InvalidInput(String),
}Expand description
All errors that may occur inside voxora-hf.
Variants§
Transport
HTTP transport failure (DNS, TCP, TLS, timeout, redirect loop).
Fields
HttpStatus
The remote returned a non-success status code.
Fields
Io
Local file I/O failure.
Fields
Json
JSON parsing failure.
Fields
Protocol
The response shape did not match what we expected (missing
siblings, no weight_map, etc.).
Fields
InvalidInput(String)
Caller-supplied input was rejected before any I/O.
Implementations§
Trait Implementations§
Source§impl Error for HfError
impl Error for HfError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for HfError
impl !UnwindSafe for HfError
impl Freeze for HfError
impl Send for HfError
impl Sync for HfError
impl Unpin for HfError
impl UnsafeUnpin for HfError
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