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