pub enum Error {
Invalid(Vec<Problem>),
NotFound(String),
Model(Error),
Tokenizer(String),
Backend(Error),
TooLong {
question: String,
options: usize,
fit: usize,
},
Unsupported(String),
}Expand description
What can go wrong.
Variants§
Invalid(Vec<Problem>)
The request does not validate. Every problem is listed, in the wire format.
NotFound(String)
The model name did not resolve.
Model(Error)
The checkpoint did not load.
Tokenizer(String)
The checkpoint’s tokenizer did not load.
Backend(Error)
The device failed, or the batch did not fit it.
TooLong
A question’s head and options do not fit the checkpoint’s budget, so some options have no marker. Laya raises the same error.
Fields
Unsupported(String)
The device asked for is not in this build or not on this machine.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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 Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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