implement more models and rhai examples
This commit is contained in:
@@ -71,3 +71,13 @@ impl<E> From<bincode::error::EncodeError> for Error<E> {
|
||||
Error::Encode(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: std::fmt::Debug + std::fmt::Display> std::fmt::Display for Error<E> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Error::DB(e) => write!(f, "Database error: {}", e),
|
||||
Error::Decode(e) => write!(f, "Failed to decode model: {}", e),
|
||||
Error::Encode(e) => write!(f, "Failed to encode model: {}", e),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user