xtask_todo_lib/devshell/vfs/
error.rs1#[derive(Debug)]
5pub enum VfsError {
6 InvalidPath,
7 Io(std::io::Error),
8}
9
10impl std::fmt::Display for VfsError {
11 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12 match self {
13 Self::InvalidPath => f.write_str("invalid path"),
14 Self::Io(e) => write!(f, "io: {e}"),
15 }
16 }
17}
18
19impl std::error::Error for VfsError {
20 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
21 match self {
22 Self::Io(e) => Some(e),
23 Self::InvalidPath => None,
24 }
25 }
26}