dope_runtime/executor/create/
error.rs1use dope_core::driver::{life::domain, result};
2
3pub enum Error<'a> {
5 Driver(&'a mut result::CreateError),
6 Shutdown(domain::Register),
7}
8
9impl Error<'_> {
10 pub fn kind(&self) -> super::Kind<'_> {
11 match self {
12 Self::Driver(error) => super::Kind::Driver(error.kind()),
13 Self::Shutdown(error) => super::Kind::Shutdown(error),
14 }
15 }
16}
17
18impl<'a> From<&'a mut result::CreateError> for Error<'a> {
19 fn from(error: &'a mut result::CreateError) -> Self {
20 Self::Driver(error)
21 }
22}
23
24impl From<domain::Register> for Error<'_> {
25 fn from(error: domain::Register) -> Self {
26 Self::Shutdown(error)
27 }
28}