composer_primitives/types/result.rs
1pub trait Exception: std::fmt::Display + std::fmt::Debug {
2 fn code(&self) -> i32;
3}
4
5pub trait Execute<T> {
6 type Input;
7 type Output;
8
9 fn execute(self, context: T) -> Result<Self::Output, Box<dyn Exception>>;
10}
11
12pub type Result<T, E = Box<dyn Exception>> = core::result::Result<T, E>;