pub enum MtmdError {
ContextCreateFailed,
BitmapCreateFailed,
InvalidPath(NulError),
PathNotUtf8,
TokenizeError(i32),
EncodeError(i32),
EvalError(i32),
}Expand description
All errors that can be returned by the mtmd module.
Variants§
ContextCreateFailed
The context could not be created (e.g. bad mmproj file).
BitmapCreateFailed
The bitmap could not be created.
InvalidPath(NulError)
A path could not be converted to a valid C string (embedded NUL byte or non-UTF-8).
PathNotUtf8
A path was not representable as UTF-8.
TokenizeError(i32)
mtmd_tokenize returned an error code.
EncodeError(i32)
mtmd_encode_chunk returned a non-zero code.
EvalError(i32)
mtmd_helper_eval_chunks (or single-chunk variant) returned a non-zero code.
Trait Implementations§
Source§impl Error for MtmdError
impl Error for MtmdError
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 Freeze for MtmdError
impl RefUnwindSafe for MtmdError
impl Send for MtmdError
impl Sync for MtmdError
impl Unpin for MtmdError
impl UnsafeUnpin for MtmdError
impl UnwindSafe for MtmdError
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