#[non_exhaustive]pub enum ArtifactContractError {
UnsupportedVersion {
artifact: String,
field: String,
value: String,
},
MissingRequiredField {
artifact: String,
field: String,
},
EmptyIdentifier {
artifact: String,
field: String,
},
EmptyCollection {
artifact: String,
field: String,
},
OutOfBounds {
artifact: String,
field: String,
location: ArtifactContractLocation,
value: String,
},
InvalidReference {
artifact: String,
field: String,
location: ArtifactContractLocation,
value: String,
},
InconsistentData {
artifact: String,
field: String,
location: ArtifactContractLocation,
value: String,
},
InvalidValue {
artifact: String,
field: String,
location: ArtifactContractLocation,
value: String,
},
}Expand description
Typed artifact-contract failure with machine-readable identity and values.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnsupportedVersion
Pack format/version is not supported by this loader revision.
Fields
MissingRequiredField
Required schema field is absent from the decoded payload.
EmptyIdentifier
Identifier field is present but empty or whitespace-only.
Fields
EmptyCollection
Collection field is empty when the schema requires entries.
Fields
OutOfBounds
Index or coordinate is outside the declared map/scene bounds.
Fields
location: ArtifactContractLocationOptional list/grid location within the artifact.
InvalidReference
Reference field points at a missing or foreign entity.
Fields
location: ArtifactContractLocationOptional list/grid location within the artifact.
InconsistentData
Related fields disagree (counts, dimensions, cross-links).
Fields
location: ArtifactContractLocationOptional list/grid location within the artifact.
InvalidValue
Field is present but not a legal domain value.
Implementations§
Source§impl ArtifactContractError
impl ArtifactContractError
Sourcepub const fn kind(&self) -> ArtifactContractKind
pub const fn kind(&self) -> ArtifactContractKind
Stable category for this error, independent of field names and display text.
Use for routing, metrics, and fixture assertions without matching every payload-bearing variant arm.
Trait Implementations§
Source§impl Clone for ArtifactContractError
impl Clone for ArtifactContractError
Source§fn clone(&self) -> ArtifactContractError
fn clone(&self) -> ArtifactContractError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ArtifactContractError
impl Debug for ArtifactContractError
Source§impl Display for ArtifactContractError
impl Display for ArtifactContractError
impl Eq for ArtifactContractError
Source§impl Error for ArtifactContractError
impl Error for ArtifactContractError
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 PartialEq for ArtifactContractError
impl PartialEq for ArtifactContractError
impl StructuralPartialEq for ArtifactContractError
Auto Trait Implementations§
impl Freeze for ArtifactContractError
impl RefUnwindSafe for ArtifactContractError
impl Send for ArtifactContractError
impl Sync for ArtifactContractError
impl Unpin for ArtifactContractError
impl UnsafeUnpin for ArtifactContractError
impl UnwindSafe for ArtifactContractError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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