airlab_lib/ctx/error.rs
1use serde::Serialize;
2
3pub type Result<T> = core::result::Result<T, Error>;
4
5#[derive(Debug, Serialize)]
6pub enum Error {
7 CtxCannotNewRootCtx,
8}
9
10impl core::fmt::Display for Error {
11 fn fmt(&self, fmt: &mut core::fmt::Formatter) -> core::result::Result<(), core::fmt::Error> {
12 write!(fmt, "{self:?}")
13 }
14}
15
16impl std::error::Error for Error {}