| 83 | |
| 84 | #[derive(Debug, Error)] |
| 85 | pub(crate) enum SaveError { |
| 86 | #[allow(dead_code)] |
| 87 | #[error("failed to read save file `{path}`: {source}")] |
| 88 | Read { |
| 89 | path: String, |
| 90 | #[source] |
| 91 | source: std::io::Error, |
| 92 | }, |
| 93 | |
| 94 | #[error("failed to write save file `{path}`: {source}")] |
| 95 | Write { |
| 96 | path: String, |
| 97 | #[source] |
| 98 | source: std::io::Error, |
| 99 | }, |
| 100 | |
| 101 | #[error("failed to serialize save data: {0}")] |
| 102 | Serialize(#[from] toml::ser::Error), |
| 103 | |
| 104 | #[error("failed to deserialize save data `{path}`: {source}")] |
| 105 | Deserialize { |
| 106 | path: String, |
| 107 | #[source] |
| 108 | source: toml::de::Error, |
| 109 | }, |
| 110 | } |
| 111 | |
| 112 | #[derive(Debug, Error)] |
| 113 | pub(crate) enum MediaError { |
nothing calls this directly
no outgoing calls
no test coverage detected