propaga-core 0.1.0

Core types and traits for the Propaga constraint solver
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::VariableId;
use thiserror::Error;

/// Errors returned by the propagation engine.
#[derive(Debug, Error, PartialEq, Eq)]
pub enum PropagaError {
    /// A variable domain became empty during propagation.
    #[error("domain of variable {0:?} is empty")]
    DomainEmpty(VariableId),

    /// A variable handle does not exist in the engine.
    #[error("unknown variable {0:?}")]
    UnknownVariable(VariableId),

    /// A propagator handle does not exist in the engine.
    #[error("unknown propagator")]
    UnknownPropagator,
}