Most of the refactor. Need to switch machines.

This commit is contained in:
Olivia Brooks
2026-02-15 09:36:04 -05:00
parent dda863e512
commit e41d4bcd76
61 changed files with 3390 additions and 618 deletions

View File

@@ -0,0 +1,35 @@
use std::sync::{MutexGuard, PoisonError, TryLockError};
use derive_more::{Display, From};
use path::PathHandler;
pub type Result<T> = core::result::Result<T, Error>;
#[derive(Debug, From, Display)]
pub enum Error {
#[from]
Io(std::io::Error),
MutexLock(String),
MutexTryLock(String),
PathSub,
#[from]
Toml(toml::de::Error),
MissingPathHandler,
}
impl From<PoisonError<MutexGuard<'_, PathHandler>>> for Error {
fn from(value: PoisonError<MutexGuard<PathHandler>>) -> Self {
Self::MutexLock(value.to_string())
}
}
impl From<TryLockError<MutexGuard<'_, PathHandler>>> for Error {
fn from(value: TryLockError<MutexGuard<PathHandler>>) -> Self {
Self::MutexTryLock(value.to_string())
}
}