Skip to main content

statum_core/
lib.rs

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