#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
#[error("an execution budget must be at least one slot")]
ZeroBudget,
#[error("a pool needs at least one worker thread")]
ZeroThreads,
#[error("failed to start the pool workers: {0}")]
PoolBuild(String),
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]
#[non_exhaustive]
pub enum Refused {
#[error("the token is a child produced by fork; its slots may share workers with siblings")]
ForkChild,
#[error("the caller is a worker of the token's pool and would occupy a participant slot")]
CallerInPool,
}