tcontract_exec/error.rs
1/// Errors from building or using an [`Exec`](crate::Exec).
2#[derive(Clone, Debug, thiserror::Error, PartialEq, Eq)]
3#[non_exhaustive]
4pub enum ExecError {
5 /// The placement layer refused a token or a pool (for example a thread
6 /// budget of zero).
7 #[error("placement: {0}")]
8 Placement(#[from] strided_exec::Error),
9 /// A forced batch strategy is unavailable on this route: for example a
10 /// [`BatchStrategy::Split`](crate::batch::BatchStrategy::Split) that asks for
11 /// both lanes and item threads on a route that runs each item serially inside
12 /// its lane.
13 #[error("batch strategy {strategy:?} is unavailable for this route")]
14 StrategyUnavailable {
15 /// The requested strategy.
16 strategy: crate::batch::BatchStrategy,
17 },
18}