jarianc 00d8e072c5 feat: Add Rust UI and backend implementation with project infrastructure
Adds the new Rust-based UI (iced), backend service, shared Swift models,
CI/CD workflows, build scripts, and project documentation.
2026-08-19 21:22:08 -05:00

38 lines
744 B
Rust

use std::io;
use thiserror::Error;
/// Backend error type
#[derive(Error, Debug)]
pub enum BackendError {
#[error("IO error: {0}")]
Io(#[from] io::Error),
#[error("Task error: {0}")]
Task(#[from] tokio::task::JoinError),
#[error("General error: {0}")]
General(String),
}
impl From<&str> for BackendError {
fn from(s: &str) -> Self {
Self::General(s.to_string())
}
}
impl From<String> for BackendError {
fn from(s: String) -> Self {
Self::General(s)
}
}
impl From<anyhow::Error> for BackendError {
fn from(e: anyhow::Error) -> Self {
Self::General(e.to_string())
}
}
/// Result type for backend operations
pub type Result<T> = std::result::Result<T, BackendError>;