elemental_core/storage/
error.rs1use std::{io, path::PathBuf};
2
3#[derive(Debug, thiserror::Error)]
4#[non_exhaustive]
5pub enum Error {
6 #[error(
7 "layout '{layout}' is missing resource {resource} for '{}'",
8 root.display()
9 )]
10 ResourceNotFound {
11 layout: &'static str,
12 resource: String,
13 root: PathBuf,
14 },
15
16 #[error("failed to {operation} '{}': {source}", path.display())]
17 Io {
18 operation: &'static str,
19 path: PathBuf,
20 #[source]
21 source: io::Error,
22 },
23}
24
25pub type Result<T> = std::result::Result<T, Error>;