Skip to main content

Error

Enum Error 

Source
#[non_exhaustive]
pub enum Error {
Show 17 variants ArcCycle(CycleChain), UnresolvedLayer { asset_path: String, arc: ArcType, introduced_by: String, site_path: Path, }, UnresolvedPrimPath { arc: ArcType, target_layer: String, prim_path: Path, introduced_by: String, site_path: Path, }, MissingDefaultPrim { layer_id: String, arc: ArcType, site_path: Path, }, InvalidDefaultPrim { layer_id: String, arc: ArcType, site_path: Path, }, InvalidExpression { expression: String, arc: ArcType, site_path: Path, message: String, }, ArcPermissionDenied { site_path: Path, arc: ArcType, target_path: Path, }, ProhibitedRelocationSource { arc: ArcType, site: Path, site_layer: String, target: Path, target_layer: String, reloc_source: Path, reloc_layer: String, composing: Path, }, InvalidExternalTargetPath { is_connection: bool, target: Path, property: Path, layer: String, arc: ArcType, arc_root: Path, composing: Path, }, InvalidInstanceTargetPath { is_connection: bool, target: Path, property: Path, layer: String, composing: Path, }, InconsistentPropertyType { property: Path, defining_layer: String, defining_path: Path, defining_is_attribute: bool, conflicting_layer: String, conflicting_path: Path, conflicting_is_attribute: bool, composing: Path, }, OpinionAtRelocationSource { source_path: Path, layer: String, composing: Path, }, UnresolvedSublayer { asset_path: String, introduced_by: String, }, SublayerCycle { root_layer: String, seen_layer: String, }, SameTargetRelocations { target: Path, sources: Vec<(Path, String)>, }, ConflictingRelocation { source_path: Path, target_path: Path, layer: String, other_source_path: Path, other_target_path: Path, other_layer: String, reason: RelocateConflictReason, }, InvalidRelocate { source_path: Path, target_path: Path, layer: String, reason: InvalidRelocateReason, },
}
Expand description

An error encountered while building a PrimIndex.

These errors represent composition diagnostics. Recoverable failures skip the broken opinion and are retained by Stage.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ArcCycle(CycleChain)

A composition arc cycle was detected (C++ PcpErrorArcCycle). The arc closing the cycle is dropped so the rest of the prim still composes; .0.hops is the chain of arcs from the composing prim to the cycle-closing (CANNOT) arc, for the diagnostic.

§

UnresolvedLayer

A layer referenced by a composition arc was not found among loaded layers (C++ “Could not open asset … for {arc}”).

Fields

§asset_path: String

The asset path that could not be matched.

§arc: ArcType

The composition arc type that introduced this dependency.

§introduced_by: String

Identifier of the layer that authored the arc.

§site_path: Path

The prim path where the arc was authored.

§

UnresolvedPrimPath

A reference/payload resolved its target layer, but the named prim path authors no spec there (C++ PcpErrorUnresolvedPrimPath). The arc is dropped while the rest of the prim still composes.

Fields

§arc: ArcType

The composition arc type.

§target_layer: String

Identifier of the resolved target layer that lacks the prim.

§prim_path: Path

The prim path that authors no spec in the target layer.

§introduced_by: String

Identifier of the layer that authored the arc.

§site_path: Path

The prim path where the arc was authored.

§

MissingDefaultPrim

An external reference/payload targets a layer without specifying a prim path, but the target layer has no defaultPrim metadata.

Fields

§layer_id: String

Identifier of the target layer.

§arc: ArcType

The composition arc type.

§site_path: Path

The prim path where the arc was authored.

§

InvalidDefaultPrim

The defaultPrim metadata on a target layer has an invalid or unexpected value.

Fields

§layer_id: String

Identifier of the target layer.

§arc: ArcType

The composition arc type.

§site_path: Path

The prim path where the arc was authored.

§

InvalidExpression

A reference/payload asset path is a variable expression that failed to parse or did not evaluate to a string (C++ PcpErrorVariableExpression). The arc is skipped and the rest of the prim still composes, so this is recoverable.

Fields

§expression: String

The raw, unevaluated backtick expression.

§arc: ArcType

The composition arc type.

§site_path: Path

The prim path where the arc was authored.

§message: String

The parse or evaluation failure.

§

ArcPermissionDenied

A direct composition arc (a reference/inherit/payload/specialize authored at the prim) targets a site whose composed permission is private (spec 10.3.3). C++ records PcpErrorArcPermissionDenied; the arc is reported but the node is retained, so this is recoverable.

Fields

§site_path: Path

The prim where the arc is authored.

§arc: ArcType

The composition arc type.

§target_path: Path

The private site the arc targets.

§

ProhibitedRelocationSource

A composition arc (inherit/specialize/reference/payload/relocate) targets a prim that is the source of a relocation — a prohibited child of its parent (C++ PcpErrorArcToProhibitedChild): allowing it would resurrect the opinions the relocation moved away. The arc is dropped. Reported while composing the prim that authored the arc (composing, stamped by the cache).

Fields

§arc: ArcType

The composition arc type.

§site: Path

The prim that authored the arc.

§site_layer: String

Identifier of the layer that authored the arc.

§target: Path

The prohibited arc target.

§target_layer: String

Identifier of the layer containing the target.

§reloc_source: Path

The relocation source making the target prohibited.

§reloc_layer: String

Identifier of the layer authoring the relocation.

§composing: Path

The prim being composed when the arc was followed.

§

InvalidExternalTargetPath

A relationship target or attribute connection authored across a composition arc names a path outside that arc’s namespace scope (C++ PcpErrorInvalidExternalTargetPath). The target cannot translate through the arc, so it is dropped. Reported while composing the owning prim.

Fields

§is_connection: bool

Whether this is an attribute connection.

§target: Path

The dropped target path.

§property: Path

The owning property path.

§layer: String

Identifier of the authoring layer.

§arc: ArcType

The composition arc crossed by the opinion.

§arc_root: Path

The arc’s root in composed namespace.

§composing: Path

The prim being composed when the target was found.

§

InvalidInstanceTargetPath

A relationship target or attribute connection authored in a class (an inherit/specialize node) names an instance of that class rather than a path within the class (C++ PcpErrorInvalidInstanceTargetPath). Pointing at a specific instance breaks the invertibility of path translation, so the target is dropped. The self instance (the one being composed) keeps the generic InvalidExternalTargetPath “outside scope” message instead. Reported while composing the owning prim.

Fields

§is_connection: bool

Whether this is an attribute connection.

§target: Path

The dropped target path, in the authoring node’s namespace.

§property: Path

The owning property path, in the authoring node’s namespace.

§layer: String

Identifier of the authoring (class) layer.

§composing: Path

The prim being composed when the target was found.

§

InconsistentPropertyType

A property composes specs of inconsistent types — an attribute spec and a relationship spec at the same path (C++ PcpErrorInconsistentPropertyType). The strongest (defining) spec’s type wins; weaker specs of the other type are ignored. Reported while composing the owning prim (.composing).

Fields

§property: Path

The composed property path.

§defining_layer: String

Identifier of the defining spec’s layer.

§defining_path: Path

The defining spec’s path.

§defining_is_attribute: bool

Whether the defining spec is an attribute.

§conflicting_layer: String

Identifier of the conflicting spec’s layer.

§conflicting_path: Path

The conflicting spec’s path.

§conflicting_is_attribute: bool

Whether the conflicting spec is an attribute.

§composing: Path

The prim being composed when the conflict was found.

§

OpinionAtRelocationSource

A layer authors a direct opinion at a relocation source path, which is invalid and ignored (C++ PcpErrorOpinionAtRelocationSource): once a prim is relocated, its source location must be empty. Reported while composing the prim that follows the relocation (composing); the cache stamps that path when collecting the build’s errors.

Fields

§source_path: Path

The relocation source path carrying the invalid opinion.

§layer: String

Identifier of the layer authoring the invalid opinion.

§composing: Path

The prim being composed when the relocation was followed.

§

UnresolvedSublayer

A sublayer asset path could not be resolved while building a layer stack (C++ PcpErrorInvalidSublayerPath). The missing sublayer is skipped.

Fields

§asset_path: String

The unresolved authored asset path.

§introduced_by: String

Identifier of the layer that authored the sublayer.

§

SublayerCycle

A layer’s subLayers form a cycle — a layer includes itself, directly or transitively (C++ PcpErrorSublayerCycle). Detected while building the stage root layer stack; the cyclic sublayer is skipped and the rest of the stack still composes. root_layer is the layer whose sublayer list re-introduces seen_layer.

Fields

§root_layer: String

Identifier of the layer whose subLayers closes the cycle.

§seen_layer: String

Identifier of the already-seen layer the cycle re-includes.

§

SameTargetRelocations

Several relocations in a layer stack move different sources to the same target (C++ PcpErrorInvalidSameTargetRelocations). All of them are invalid and dropped.

Fields

§target: Path

The shared target path.

§sources: Vec<(Path, String)>

Source paths and their authoring layer identifiers.

§

ConflictingRelocation

Two relocations in a layer stack conflict — one’s target is another’s source, or one’s source/target is a descendant of another’s source (C++ PcpErrorInvalidConflictingRelocation). The relocate is dropped; reason is the specific rule violated.

Fields

§source_path: Path

The reported relocate’s source.

§target_path: Path

The reported relocate’s target.

§layer: String

Identifier of the reported relocate’s layer.

§other_source_path: Path

The conflicting relocate’s source.

§other_target_path: Path

The conflicting relocate’s target.

§other_layer: String

Identifier of the conflicting relocate’s layer.

§reason: RelocateConflictReason

The conflict rule violated.

§

InvalidRelocate

An authored relocate that breaks a structural rule — source and target identical or nested, or a root-prim source — is invalid and ignored (C++ PcpErrorInvalidAuthoredRelocates). It is dropped while the layer stack still composes. reason is the specific rule violated.

Fields

§source_path: Path

The relocate source path.

§target_path: Path

The relocate target path.

§layer: String

Identifier of the layer that authored the relocate.

§reason: InvalidRelocateReason

The structural rule the relocate violates.

Trait Implementations§

Source§

impl Clone for Error

Source§

fn clone(&self) -> Error

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 Error

Source§

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

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

impl Display for Error

Source§

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

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

impl Error for Error

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

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

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

§

impl UnwindSafe for Error

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> 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<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> 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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.