#[non_exhaustive]pub enum ApplyApiError {
PrimNotValid {
path: Path,
},
Composition(QueryError),
NotAppliedApi {
schema: Token,
},
MissingInstanceName {
schema: Token,
},
UnexpectedInstanceName {
schema: Token,
instance: Token,
},
InstanceNameNotAllowed {
schema: Token,
instance: Token,
},
PrimTypeNotAllowed {
schema: Token,
allowed: Vec<Token>,
},
}Expand description
Why an API schema cannot be applied to a prim — the reason C++
UsdPrim::CanApplyAPI reports through its whyNot.
Apart from PrimNotValid, every variant names a
registered schema: a name no registry knows carries no rules to break, so
applying it is accepted (see Prim::apply_api).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
PrimNotValid
No prim is composed at the path, so there is nothing to apply to.
Composition(QueryError)
Deciding the question needed the prim’s composed type, and composing it failed.
NotAppliedApi
The schema is registered, but is not one that applies to a prim through
apiSchemas — a typed schema, or a non-applied API schema.
MissingInstanceName
A multiple-apply schema applies per instance, so it needs an instance
name (CollectionAPI:render).
UnexpectedInstanceName
A single-apply schema applies whole, so it has no instance to name.
Fields
InstanceNameNotAllowed
The schema restricts its instance names, or the name collides with one of the schema’s own property base names.
PrimTypeNotAllowed
The schema’s apiSchemaCanOnlyApplyTo does not cover this prim’s type.
Trait Implementations§
Source§impl Debug for ApplyApiError
impl Debug for ApplyApiError
Source§impl Display for ApplyApiError
impl Display for ApplyApiError
Source§impl Error for ApplyApiError
impl Error for ApplyApiError
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()