Rewrite Curator in Rust with an egui GUI

This commit is contained in:
2026-10-17 11:28:17 +02:00
parent 364b515e3c
commit 65b5b74c9f
156 changed files with 24359 additions and 25795 deletions
+33
View File
@@ -0,0 +1,33 @@
//! The error type shared by the core modules.
use std::io;
/// Everything a core operation can fail with. The `Display` text is shown to the
/// user as-is, so validation messages are written in Czech like the rest of the UI.
#[derive(Debug, thiserror::Error)]
pub enum CoreError {
/// Invalid input (bad year, empty title, unknown 3D format, …).
#[error("{0}")]
Invalid(String),
/// The target already exists and the caller asked not to overwrite it.
#[error("{0}")]
Exists(String),
/// Something expected on disk is missing.
#[error("{0}")]
NotFound(String),
/// A remote service (TMDb, ČSFD, Jellyfin) failed.
#[error("{0}")]
Remote(String),
#[error(transparent)]
Io(#[from] io::Error),
#[error(transparent)]
Json(#[from] serde_json::Error),
}
impl CoreError {
pub fn invalid(msg: impl Into<String>) -> Self {
Self::Invalid(msg.into())
}
}
pub type CoreResult<T> = Result<T, CoreError>;