Skip to main content

BuildError

Enum BuildError 

Source
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.

Fields

§feature: FeatureName

The feature.

§detail: String

What is wrong, as text for a person to read.

§

UndeclaredElementTypeText

A feature gave a documentation text to an element type (FeatureBuilder::element_type_text) that it does not declare.

Fields

§feature: FeatureName

The feature that gave the text.

§element: ElementName

The 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: ElementName

The element type.

§first: FeatureName

The feature that gave the first text, or LANGUAGE_OWNER for the language.

§second: FeatureName

The 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: FeatureName

The 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

§kind: &'static str

The namespace (capability, table, stage, peer table, and so on).

§name: Name

The name.

§first: FeatureName

The feature that made the first declaration.

§second: FeatureName

The feature that made the second declaration.

§

TableCapabilityClash

A table and a capability declared on its own have the same name.

Fields

§name: CapName

The name.

§table_owner: FeatureName

The feature declaring the table.

§capability_owner: FeatureName

The feature declaring the capability.

§

Undeclared

A declaration refers to an entity that no feature declares.

Fields

§feature: FeatureName

The feature whose declaration holds the reference.

§kind: &'static str

The namespace of the missing entity (capability, table, stage, element, and so on).

§site: Site

Where in the declaration the reference is written.

§name: Name

The name referred to.

§roster: Vec<Name>

The names declared in that namespace, in name order.

§

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: FeatureName

The 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.

§role: Name

The role.

§roster: Vec<Name>

The argument role names that features declare, in name order.

§

TableTypeMismatch

A declaration refers to a table with a value type other than the table’s declared value type.

Fields

§feature: FeatureName

The feature whose declaration holds the reference.

§site: Site

Where in the declaration the reference is written.

§table: CapName

The table.

§declared: &'static str

The declared value type.

§referenced: &'static str

The type the reference expects.

§

RefinesCycle

A chain of capability refinements leads back to a capability already in it.

Fields

§cycle: Vec<CapName>

The capabilities of the cycle, starting at the first in name order.

§

TwoDefaults

Two refinements of one capability are marked as its default.

Fields

§parent: CapName

The capability they refine.

§first: CapName

The first refinement marked default.

§second: CapName

The second refinement marked default.

§

DefaultWithoutParent

A capability is marked as a default refinement but refines nothing.

Fields

§name: CapName

The capability.

§

CheckWrites

A stage whose effect is Check declares a write of a table.

Fields

§stage: StageName

The stage.

§table: CapName

The table.

§

ExternalTableWritten

A stage declares a write of an external table, which only the caller installs.

Fields

§stage: StageName

The stage.

§table: CapName

The table.

§

CollectionAsCapability

A stage provides a collection: a collection can be demanded but never provided.

Fields

§stage: StageName

The stage.

§site: Site

Where in the stage’s declaration the collection is written.

§collection: CapName

The collection.

§

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: ElementName

The element.

§backend: Option<BackendName>

The backend, or None for the general default.

§first: RuleName

The first rule marked default.

§second: RuleName

The second rule marked 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.

Fields

§output: OutputName

The output.

§capability: CapName

The capability.

§table: CapName

The table.

§

OutputTableNotArtifactSet

An output’s table is not an artifact set.

Fields

§output: OutputName

The output.

§table: CapName

The table.

§ty: &'static str

The table’s value type.

§

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

§kind: &'static str

style or script.

§definition: Name

The definition’s identifier.

§table: CapName

The table the part names.

§found: Option<&'static str>

The value type the table is declared with; None when no feature declares it.

§

AspectCollision

An aspect is attached to an element that already carries it.

Fields

§feature: FeatureName

The attaching feature.

§element: ElementName

The element.

§aspect: &'static str

The aspect’s type name.

§

NativeSetIncomplete

A backend’s native set lacks an element that a native-set implication requires it to hold.

Fields

§backend: BackendName

The 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: ElementName

The 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: FeatureName

The feature that made the peer declaration.

§element: ElementName

The element.

§declared: Option<&'static str>

The payload type of the element’s own declaration, or None when the name is that of a source element (an element that can appear in a parsed document), which carries no payload.

§expected: &'static str

The payload type given in the peer declaration.

§

PeerTableMismatch

A peer declaration of a table resolved to a table whose value type is not the signature of the peer declaration.

Fields

§feature: FeatureName

The feature that made the peer declaration.

§table: CapName

The table.

§declared: &'static str

The value type of the table’s own declaration.

§expected: &'static str

The value type given in 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.

Fields

§feature: FeatureName

The feature.

§action: RoundTwoAction

The action attempted.

§

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: FeatureName

The feature that registered the hook.

§detail: String

What failed, as the hook reported it.

§

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BuildError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for BuildError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for BuildError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Replaced by Error::source.
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ServiceError> for BuildError

Source§

fn from(error: ServiceError) -> BuildError

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Forget for BuildError

§

impl Freeze for BuildError

§

impl Move for BuildError

§

impl RefUnwindSafe for BuildError

§

impl Send for BuildError
where Arc<str>: Send, RawVecInner: Send, &'static str: Send, BoxRaw<ArgumentPlace>: Send, TypeId: Send, BoxRaw<[Vec<FeatureName>]>: Send,

§

impl Sync for BuildError
where Arc<str>: Sync, RawVecInner: Sync, BoxRaw<ArgumentPlace>: Sync, TypeId: Sync, BoxRaw<[Vec<FeatureName>]>: Sync,

§

impl Unpin for BuildError

§

impl UnsafeUnpin for BuildError

§

impl UnwindSafe for BuildError
where Arc<str>: UnwindSafe, RawVecInner: UnwindSafe, &'static str: UnwindSafe, BoxRaw<ArgumentPlace>: UnwindSafe, *const (): UnwindSafe, BoxRaw<[Vec<FeatureName>]>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<Src, Dst> LosslessTryInto<Dst> for Src
where Dst: LosslessTryFrom<Src>,

Source§

fn lossless_try_into(self) -> Option<Dst>

Performs the conversion.
Source§

impl<Src, Dst> LossyInto<Dst> for Src
where Dst: LossyFrom<Src>,

Source§

fn lossy_into(self) -> Dst

Performs the conversion.
Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> StrictAs for T

Source§

fn strict_as<Dst>(self) -> Dst
where T: StrictCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> StrictCastFrom<Src> for Dst
where Src: StrictCast<Dst>,

Source§

fn strict_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.