llama_cpp_bindings/mtmd/
mtmd_bitmap_error.rs1use std::path::PathBuf;
2
3#[derive(thiserror::Error, Debug)]
4pub enum MtmdBitmapError {
5 #[error("Failed to create CString from bitmap-source path: {0}")]
6 CStringError(#[from] std::ffi::NulError),
7 #[error("Bitmap-source path is not valid UTF-8: {0:?}")]
8 PathToStrError(PathBuf),
9 #[error("Invalid data size for bitmap")]
10 InvalidDataSize,
11 #[error("Image dimensions too small: {0}x{1} (minimum 2x2)")]
12 ImageDimensionsTooSmall(u32, u32),
13 #[error("bitmap data could not be decoded")]
14 BitmapDecodeFailed,
15 #[error("bitmap file is unreadable: {path:?}")]
16 FileUnreadable { path: PathBuf },
17 #[error("not enough memory")]
18 NotEnoughMemory,
19 #[error("{message}")]
20 Reported { message: String },
21}