You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
471 B
27 lines
471 B
//! Local state change error
|
|
use super::*;
|
|
use std::{
|
|
error,
|
|
fmt,
|
|
};
|
|
|
|
/// Local state updating errors
|
|
#[derive(Debug)]
|
|
#[non_exhaustive]
|
|
pub enum Error {
|
|
BroadcastUpdate,
|
|
Unknown,
|
|
}
|
|
impl error::Error for Error{}
|
|
impl fmt::Display for Error
|
|
{
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
|
|
{
|
|
match self {
|
|
Self::BroadcastUpdate => write!(f, "failed to broadcast state body update"),
|
|
_ => write!(f, "unknown error"),
|
|
}
|
|
}
|
|
}
|
|
|