voml_error/error/
for_std.rs1use super::*;
2
3impl From<std::io::Error> for VomlError {
4 fn from(e: std::io::Error) -> Self {
5 Self { kind: Box::new(VomlErrorKind::IOError(e)), level: DiagnosticLevel::Error, file: Default::default() }
6 }
7}
8impl From<Infallible> for VomlError {
15 fn from(_: Infallible) -> Self {
16 Self { kind: Box::new(VomlErrorKind::UnknownError), level: DiagnosticLevel::Error, file: Default::default() }
17 }
18}
19
20impl From<()> for VomlError {
21 fn from(_: ()) -> Self {
22 Self { kind: Box::new(VomlErrorKind::UnknownError), level: DiagnosticLevel::Error, file: Default::default() }
23 }
24}