add Error::is_runtime_startup() method

This commit is contained in:
Sean McArthur
2019-01-02 11:12:25 -08:00
parent 4df232efad
commit 3877e8729c

View File

@@ -209,6 +209,14 @@ impl Error {
_ => None,
}
}
/// Returns true if this error is due to a failure starting the runtime.
pub fn is_runtime_startup(&self) -> bool {
match self.inner.kind {
Kind::RuntimeStartupFailure => true,
_ => false,
}
}
}
impl fmt::Debug for Error {