#[non_exhaustive]pub enum QueryError {
Show 40 variants
InvalidResponse(String),
InvalidTransport(String),
InvalidInterference(String),
TreatmentEqualsOutcome {
id: VariableId,
},
InterventionVariableMismatch {
expected: VariableId,
got: VariableId,
},
AmbiguousInterventionTarget,
ModifierOverlapsTreatmentOrOutcome,
InvalidTemporalWindow {
from: i32,
until: i32,
},
NonPositiveHorizon,
InvalidIntervention(String),
EmptyCounterfactualOutcomes,
EmptyAnomalyTargets,
NonPositiveAnomalyLimit,
EmptyMediators,
MediatorOverlapsTreatmentOrOutcome,
EmptyEffectModifiers,
EmptyPopulationRows,
EmptyPredicateName,
DynamicPolicyHasNoTreatmentOffset,
InvalidPopulationTimeRange {
start: usize,
end: usize,
},
EmptyAllocationOrder,
DuplicateAllocationComponent,
NonPositiveShapleyLimit,
NonPositiveShapleySamples,
NonPositiveComponentLimit,
EmptyMechanismChangeTargets,
InvalidSignificanceLevel,
EmptyDistributionOutcomes,
NonPositivePathLimit,
PathNodeOverlapsTreatmentOrOutcome,
ConditioningOverlapsOutcomeOrIntervention,
PopulationRegistryRequired,
UnknownPredicateName {
name: Arc<str>,
},
UnknownDistributionRef {
id: u32,
},
PopulationNeedsTreatment,
PopulationNonBinaryTreatment,
PopulationLengthMismatch {
expected: usize,
actual: usize,
},
PopulationRowOutOfRange {
row: usize,
n: usize,
},
PopulationEnvironmentUnsupported,
InvalidPopulationWeights,
}Expand description
Errors from query construction or validation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidResponse(String)
Invalid continuous-response configuration.
InvalidTransport(String)
Invalid transportability configuration.
InvalidInterference(String)
Invalid randomization/interference configuration.
TreatmentEqualsOutcome
Treatment and outcome are the same variable.
Fields
id: VariableIdShared id.
InterventionVariableMismatch
Intervention does not target the declared treatment.
AmbiguousInterventionTarget
Intervention sequence has no unique target variable.
ModifierOverlapsTreatmentOrOutcome
Effect modifier overlaps treatment or outcome.
InvalidTemporalWindow
Sustained window has until < from.
NonPositiveHorizon
Horizon must be at least one time step.
InvalidIntervention(String)
Nested intervention failed validation.
EmptyCounterfactualOutcomes
Counterfactual query has no outcomes.
EmptyAnomalyTargets
Anomaly query has no targets.
NonPositiveAnomalyLimit
Anomaly max_units must be ≥ 1.
EmptyMediators
Mediation query has no mediators.
MediatorOverlapsTreatmentOrOutcome
Mediator overlaps treatment or outcome.
EmptyEffectModifiers
Conditional effect requires non-empty modifiers.
EmptyPopulationRows
Population selector has no rows.
EmptyPredicateName
Named crate::query::PredicateExpr has an empty registry key.
DynamicPolicyHasNoTreatmentOffset
crate::intervention::TemporalPolicy::Dynamic has no single treatment origin.
InvalidPopulationTimeRange
Time-range population has end <= start.
EmptyAllocationOrder
Sequential allocation order is empty.
DuplicateAllocationComponent
Sequential allocation order contains the same component more than once.
NonPositiveShapleyLimit
Shapley exact component limit must be ≥ 1.
NonPositiveShapleySamples
Approximate Shapley sample / permutation count must be ≥ 1.
NonPositiveComponentLimit
Change attribution max_components must be ≥ 1.
EmptyMechanismChangeTargets
Mechanism-change query has no targets.
InvalidSignificanceLevel
Significance level must be in (0, 1).
EmptyDistributionOutcomes
Interventional distribution query has no outcomes.
NonPositivePathLimit
Path enumeration max_paths / max_len must be ≥ 1.
PathNodeOverlapsTreatmentOrOutcome
Path node overlaps treatment or outcome.
ConditioningOverlapsOutcomeOrIntervention
Distribution conditioning overlaps an outcome or intervention target.
PopulationRegistryRequired
Named / custom population requires a super::PopulationRegistry.
UnknownPredicateName
Named predicate is not bound in the registry.
UnknownDistributionRef
Custom distribution handle is not bound in the registry.
PopulationNeedsTreatment
Treated / untreated population requires a treatment column.
PopulationNonBinaryTreatment
Treatment column is not binary 0/1.
PopulationLengthMismatch
Keep-mask / weight length mismatch.
PopulationRowOutOfRange
Predicate row index ≥ n.
PopulationEnvironmentUnsupported
Environment-restricted populations need multi-env data (not resolved here).
InvalidPopulationWeights
Distribution weights contain negatives or non-finite values.
Trait Implementations§
Source§impl Clone for QueryError
impl Clone for QueryError
Source§fn clone(&self) -> QueryError
fn clone(&self) -> QueryError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QueryError
impl Debug for QueryError
Source§impl Display for QueryError
impl Display for QueryError
impl Eq for QueryError
Source§impl Error for QueryError
impl Error for QueryError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()