quick_error! {
#[derive(Debug, PartialEq, Eq)]
pub enum Error {
OwnNameDisallowed {
description("Own name disallowed")
display("Our own name is not allowed to be added to the routing table.")
}
PeerNameUnsuitable {
description("Peer name unsuitable")
display("Peer's name can't be added to the routing table as it's outwith all sections.")
}
AlreadyExists {
description("Peer name already exists")
display("Peer's name has already been added to the routing table.")
}
CannotRoute {
description("Can't use requested route")
display("Destination section doesn't have enough members to use requested route.")
}
NoSuchPeer {
description("No such peer")
display("Peer doesn't exist on the network.")
}
InvariantViolation {
description("Network invariant violation")
display("The routing table state violates the network invariant.")
}
}
}