1use alloc::{
4 boxed::Box,
5 string::{String, ToString},
6};
7use distrib_common::BoxError;
8use thiserror::Error;
9
10#[derive(Debug, Error)]
11pub enum LoadManifestError {
12 #[error(transparent)]
13 Other(#[from] BoxError),
14}
15
16#[cfg(feature = "std")]
17impl From<std::io::Error> for LoadManifestError {
18 fn from(error: std::io::Error) -> Self {
19 Self::Other(error.into())
20 }
21}
22
23impl From<toml1::de::Error> for LoadManifestError {
24 fn from(error: toml1::de::Error) -> Self {
25 Self::Other(error.into())
26 }
27}
28
29impl From<cargo_toml::Error> for LoadManifestError {
30 fn from(error: cargo_toml::Error) -> Self {
31 Self::Other(error.into())
32 }
33}