oak_core/errors/
from_std.rs

1use crate::errors::{OakError, OakErrorKind};
2
3impl From<OakErrorKind> for OakError {
4    fn from(kind: OakErrorKind) -> Self {
5        Self { kind: Box::new(kind) }
6    }
7}
8
9impl From<std::io::Error> for OakError {
10    fn from(error: std::io::Error) -> Self {
11        OakErrorKind::IoError { error, url: None }.into()
12    }
13}