Skip to main content

luminos_contracts/container/
error.rs

1#[derive(Debug)]
2pub enum Error {
3    ServiceNotFound(String),
4    TypeMismatch(String)
5}
6
7impl std::fmt::Display for Error {
8	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9		match self {
10			Self::ServiceNotFound(t) => write!(f, "Service not found: {t}"),
11			Self::TypeMismatch(t) => write!(f, "Type mismatch for service: {t}"),
12		}
13	}
14}
15
16impl std::error::Error for Error {}