statum_core/lib.rs
1#[derive(Debug)]
2pub enum Error {
3 InvalidState,
4}
5
6pub type Result<T> = core::result::Result<T, Error>;
7
8impl<T> From<Error> for core::result::Result<T, Error> {
9 fn from(val: Error) -> Self {
10 Err(val)
11 }
12}
13
14impl core::fmt::Display for Error {
15 fn fmt(&self, fmt: &mut core::fmt::Formatter) -> core::result::Result<(), core::fmt::Error> {
16 write!(fmt, "{self:?}")
17 }
18}
19
20impl std::error::Error for Error {}