pub enum BuildError {
DuplicateName {
name: String,
},
AnchorNotFound {
anchor: String,
},
UnsatisfiedRead {
step: String,
entry: &'static str,
},
EmptyBranch {
step: String,
},
UnrepeatableConsume {
step: String,
entry: &'static str,
},
}Expand description
Why PipelineBuilder::build rejected a pipeline.
See PipelineBuilder::build for a runnable example of the
UnsatisfiedRead case.
Variants§
DuplicateName
Two steps — including one placed by
PipelineBuilder::insert_before/PipelineBuilder::insert_after —
share the same Step::name.
AnchorNotFound
An insert_before/
insert_after call named an anchor
that no step, whether added directly or by another pending insert,
ever resolves to.
UnsatisfiedRead
A step declares AccessSpec::reads for a type that no earlier
step (or the pipeline’s input type) declares writing. Also used for
an Arm step that reads a type an earlier step in the
same arm has already consumed (via AccessSpec::consumes) without
a later step rewriting it — that type is gone for the rest of the
arm regardless of what’s available outside it, so this is caught
when the arm itself is built rather than deferred to the enclosing
pipeline.
Fields
EmptyBranch
A Branch was built with no arms registered via
BranchBuilder::arm. Such a branch
would fail every run with
PipelineError::NoMatchingBranch
regardless of the key its condition function produces, so it’s
rejected at build time instead.
UnrepeatableConsume
A Loop’s body Arm consumes a type via
AccessSpec::consumes without a later step in that same body
rewriting it. A Loop body runs more than once, so a type it
consumed and never rewrote would exist on the first iteration but be
gone from the second one onward — a failure mode
Arm::build’s single-pass check can’t
see, since it only reasons about one execution of the body.
Trait Implementations§
Source§impl Debug for BuildError
impl Debug for BuildError
Source§impl Display for BuildError
impl Display for BuildError
Source§impl Error for BuildError
impl Error for BuildError
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()