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