use crate::db::ArcUpgradeError;
#[derive(Debug, thiserror::Error, Clone, Copy, PartialEq, Eq)]
pub enum ConcurrentStateError {
#[error("{0}")]
Arc(#[from] ArcUpgradeError),
#[error("Child belongs to a different parent")]
NotParent,
}
impl ConcurrentStateError {
pub const fn not_parent() -> Self {
Self::NotParent
}
pub const fn not_unique() -> Self {
Self::Arc(ArcUpgradeError::NotUnique)
}
}