1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
//! WorldGraph error type. use crate::model::WorldId; /// Errors from WorldGraph operations. #[derive(Debug, thiserror::Error)] pub enum WorldGraphError { /// An edge endpoint referenced an unknown node. #[error("unknown node {0:?}")] UnknownNode(WorldId), /// (De)serialisation of the persisted graph failed. #[error("serialization error: {0}")] Serde(#[from] serde_json::Error), }