pub enum BuildError {
Show 29 variants
Feature {
feature: FeatureName,
detail: String,
},
UndeclaredElementTypeText {
feature: FeatureName,
element: ElementName,
declarers: Vec<FeatureName>,
},
DuplicateElementTypeText {
element: ElementName,
first: FeatureName,
second: FeatureName,
},
DuplicateFeature {
feature: FeatureName,
},
Duplicate {
kind: &'static str,
name: Name,
first: FeatureName,
second: FeatureName,
},
TableCapabilityClash {
name: CapName,
table_owner: FeatureName,
capability_owner: FeatureName,
},
Undeclared {
feature: FeatureName,
kind: &'static str,
site: Site,
name: Name,
roster: Vec<Name>,
},
UndeclaredArgumentRole {
feature: FeatureName,
place: Box<ArgumentPlace>,
role: Name,
roster: Vec<Name>,
},
TableTypeMismatch {
feature: FeatureName,
site: Site,
table: CapName,
declared: &'static str,
referenced: &'static str,
},
RefinesCycle {
cycle: Vec<CapName>,
},
TwoDefaults {
parent: CapName,
first: CapName,
second: CapName,
},
DefaultWithoutParent {
name: CapName,
},
CheckWrites {
stage: StageName,
table: CapName,
},
ExternalTableWritten {
stage: StageName,
table: CapName,
},
CollectionAsCapability {
stage: StageName,
site: Site,
collection: CapName,
},
TwoDefaultRules {
element: ElementName,
backend: Option<BackendName>,
first: RuleName,
second: RuleName,
},
ExtendsCycle {
cycle: Vec<WorkflowName>,
},
OutputCapabilityMismatch {
output: OutputName,
capability: CapName,
table: CapName,
},
OutputTableNotArtifactSet {
output: OutputName,
table: CapName,
ty: &'static str,
},
DefinitionPartTable {
kind: &'static str,
definition: Name,
table: CapName,
found: Option<&'static str>,
},
AspectCollision {
feature: FeatureName,
element: ElementName,
aspect: &'static str,
},
NativeSetIncomplete {
backend: BackendName,
because: Option<ElementName>,
must_claim: ElementName,
},
PeerElementMismatch {
feature: FeatureName,
element: ElementName,
declared: Option<&'static str>,
expected: &'static str,
},
PeerTableMismatch {
feature: FeatureName,
table: CapName,
declared: &'static str,
expected: &'static str,
},
Service(ServiceError),
ContributionAfterAssembly {
feature: FeatureName,
action: RoundTwoAction,
},
Lang(LangBuildError),
LateInit {
feature: FeatureName,
detail: String,
},
FeatureOrderCycle {
cycle: Vec<FeatureName>,
chains: Vec<FeatureChain>,
},
}Expand description
An error found while a registry is built, attributed to the feature at fault wherever one feature is at fault.
Each variant holds the parts of its message as data, not as text; Display
writes the standard English message. A build collects every error of the
phase that fails and returns them together in a
RegistryBuildError. A feature’s
register method or a Finalizer may also
return a BuildError (usually the one a builder method returned) to refuse
the build.
Variants§
Feature
A feature refused the build, or one of its declarations was refused
with a message of its own: the feature’s
register method or one of its
Finalizers returned an error, or a workflow the feature registered
sets an option value of an option type that no feature declares, or of
one that cannot be set on a render request.
UndeclaredElementTypeText
A feature gave a documentation text to an element type
(FeatureBuilder::element_type_text) that it does not declare.
Fields
feature: FeatureNameThe feature that gave the text.
element: ElementNameThe element type.
declarers: Vec<FeatureName>The features that declare the element type, in name order, with
LANGUAGE_OWNER for a
structural element type; empty when no feature declares it.
DuplicateElementTypeText
Two declarations gave a documentation text to one element type: two
calls of FeatureBuilder::element_type_text, or one beside the
text of the language’s structural element type or of a presentation
element of that name.
Fields
element: ElementNameThe element type.
first: FeatureNameThe feature that gave the first text, or
LANGUAGE_OWNER for the
language.
second: FeatureNameThe feature that gave the second text; the same as first when
one feature gave two texts.
DuplicateFeature
Two features are registered under one name.
Fields
feature: FeatureNameThe name.
Duplicate
Two declarations of one name in one namespace. For a peer
declaration, first and second are the same feature, which declared
the name twice with two different signatures.
Fields
first: FeatureNameThe feature that made the first declaration.
second: FeatureNameThe feature that made the second declaration.
TableCapabilityClash
A table and a capability declared on its own have the same name.
Fields
table_owner: FeatureNameThe feature declaring the table.
capability_owner: FeatureNameThe feature declaring the capability.
Undeclared
A declaration refers to an entity that no feature declares.
Fields
feature: FeatureNameThe feature whose declaration holds the reference.
UndeclaredArgumentRole
An argument has a role (ArgDef::role)
that no feature declares, and that the feature whose declaration holds
the argument did not declare as a peer
(FeatureBuilder::peer_argument_role).
Fields
feature: FeatureNameThe feature whose declaration holds the argument.
place: Box<ArgumentPlace>Where the argument stands in the declaration. The place is boxed,
so that a BuildError stays small.
TableTypeMismatch
A declaration refers to a table with a value type other than the table’s declared value type.
Fields
feature: FeatureNameThe feature whose declaration holds the reference.
RefinesCycle
A chain of capability refinements leads back to a capability already in it.
TwoDefaults
Two refinements of one capability are marked as its default.
Fields
DefaultWithoutParent
A capability is marked as a default refinement but refines nothing.
CheckWrites
A stage whose effect is Check declares a write of a table.
ExternalTableWritten
A stage declares a write of an external table, which only the caller installs.
CollectionAsCapability
A stage provides a collection: a collection can be demanded but never provided.
Fields
TwoDefaultRules
Two lowering rules are marked as the default for one element on one backend, or as the general default for one element.
Fields
element: ElementNameThe element.
backend: Option<BackendName>The backend, or None for the general default.
ExtendsCycle
A chain of workflows, each extending the next, leads back to a workflow already in it.
Fields
cycle: Vec<WorkflowName>The workflows of the cycle, starting at the first in name order.
OutputCapabilityMismatch
An output’s capability is neither its table’s capability nor a refinement of it.
OutputTableNotArtifactSet
An output’s table is not an artifact set.
Fields
output: OutputNameThe output.
DefinitionPartTable
A part of a style or script definition that takes its text from a
table (DefContent::Table) names a table
that no feature declares, or one that does not hold
DefinitionText.
Fields
AspectCollision
An aspect is attached to an element that already carries it.
NativeSetIncomplete
A backend’s native set lacks an element that a native-set implication requires it to hold.
Fields
backend: BackendNameThe backend.
because: Option<ElementName>The element of the backend’s native set that made the implication
apply, or None when the implication applies to every backend.
must_claim: ElementNameThe element the backend’s native set must also hold.
PeerElementMismatch
A peer declaration of a presentation element resolved to an element whose payload type is not the signature of the peer declaration.
Fields
feature: FeatureNameThe feature that made the peer declaration.
element: ElementNameThe element.
PeerTableMismatch
A peer declaration of a table resolved to a table whose value type is not the signature of the peer declaration.
Fields
feature: FeatureNameThe feature that made the peer declaration.
Service(ServiceError)
A problem with a service slot, found when the slots are assembled.
ContributionAfterAssembly
A Finalizer attempted an action that only the first registration
round may perform.
Lang(LangBuildError)
The build of the FLM language from the element declarations found a problem, such as two features defining one command.
LateInit
A LateInit hook failed.
Fields
feature: FeatureNameThe feature that registered the hook.
FeatureOrderCycle
The chains of the feature order, reduced to the features of the
registry, order a feature before itself, so the features have no final
order (super::order). The build reports one cycle.
Fields
cycle: Vec<FeatureName>The features of the cycle, each placed before the next and the last before the first, starting from the feature of the cycle that comes first in the order the features were added.
chains: Vec<FeatureChain>Every chain that orders two consecutive features of the cycle, as written and with its origin, in the order of the cycle.
Trait Implementations§
Source§impl Clone for BuildError
impl Clone for BuildError
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()
Source§impl From<ServiceError> for BuildError
impl From<ServiceError> for BuildError
Source§fn from(error: ServiceError) -> BuildError
fn from(error: ServiceError) -> BuildError
Auto Trait Implementations§
impl Forget for BuildError
impl Freeze for BuildError
impl Move for BuildError
impl RefUnwindSafe for BuildError
impl Send for BuildError
impl Sync for BuildError
impl Unpin for BuildError
impl UnsafeUnpin for BuildError
impl UnwindSafe for BuildError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more