use thiserror::Error;
use crate::project::DataDirectory;
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum CreateDataDirectoryError {
#[error("failed to create the data directory of the project at `{path}`")]
#[non_exhaustive]
UncreatableDataDirectory {
path: DataDirectory,
source: std::io::Error,
},
#[error("the local data directory of the platform is unknown")]
#[non_exhaustive]
UnknownLocalDataDirectory {},
}
#[cfg(test)]
mod tests {
#![allow(clippy::missing_panics_doc)]
use super::*;
#[test]
fn create_data_directory_error_is_send_and_sync() {
fn assert_send_and_sync<T: Send + Sync>() {}
assert_send_and_sync::<CreateDataDirectoryError>();
}
}