Skip to main content

PropertyError

Enum PropertyError 

Source
#[non_exhaustive]
pub enum PropertyError {
Show 31 variants EmptyLayerName, ExpectedDenseStorage { name: LayerName, }, ExpectedSparseStorage { name: LayerName, }, DefaultPolicyMismatch { name: LayerName, }, ArrowTypeMismatch { name: LayerName, }, IdFamilyMismatch { expected: IdFamily, actual: IdFamily, }, LayerTooShort { required: usize, actual: usize, }, UnexpectedNull { index: usize, }, SparseLengthMismatch { indices: usize, values: usize, }, SparseIndexOrder { position: usize, }, SparseIndexOutOfBounds { index: u64, len: usize, }, DuplicateName { id_family: IdFamily, name: LayerName, }, SparseNullMissingNotTotal { name: LayerName, }, DuplicateLayerId { layer_id: u64, }, MissingSnapshotSection { kind: u32, }, SnapshotSectionVersion { kind: u32, version: u32, }, SnapshotSectionView { kind: u32, error: SectionViewError, }, SnapshotRangeOutOfBounds { offset: usize, len: usize, available: usize, }, SnapshotInvalidUtf8 { offset: usize, }, UnknownIdFamilyTag { tag: u32, }, UnknownLayerRoleTag { tag: u32, }, UnknownStorageTag { tag: u32, }, UnknownMissingPolicyTag { tag: u32, }, UnknownArrowFamilyTag { tag: u32, }, UnknownIdentityModeTag { tag: u32, }, SnapshotDescriptorMismatch { reason: &'static str, }, SnapshotDataLength { reason: &'static str, }, Arrow { message: String, }, MissingIdentityMap { id_family: IdFamily, }, IdentityMapLength { id_family: IdFamily, required: usize, actual: usize, }, LengthDoesNotFitU64 { value: usize, },
}
Expand description

Errors raised while validating property descriptors, layers, or snapshots.

§Performance

Formatting is O(message length).

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

EmptyLayerName

Layer names must not be empty.

§

ExpectedDenseStorage

Dense layers must use dense descriptors.

Fields

§name: LayerName

Name of the offending layer.

§

ExpectedSparseStorage

Sparse layers must use sparse descriptors.

Fields

§name: LayerName

Name of the offending layer.

§

DefaultPolicyMismatch

A sparse descriptor and default value disagreed.

Fields

§name: LayerName

Name of the offending layer.

§

ArrowTypeMismatch

A layer’s Arrow data type did not match the descriptor field type.

Fields

§name: LayerName

Name of the offending layer.

§

IdFamilyMismatch

A layer’s ID family did not match the requested adapter family.

Fields

§expected: IdFamily

Expected ID family.

§actual: IdFamily

Actual ID family.

§

LayerTooShort

A layer had too few values for the topology index bound.

Fields

§required: usize

Required minimum length.

§actual: usize

Actual layer length.

§

UnexpectedNull

A non-nullable selected layer contained a null slot.

Fields

§index: usize

Index of the null slot.

§

SparseLengthMismatch

Sparse index and value arrays differed in length.

Fields

§indices: usize

Sparse index count.

§values: usize

Sparse value count.

§

SparseIndexOrder

Sparse indexes must be strictly increasing.

Fields

§position: usize

Sparse array position where order failed.

§

SparseIndexOutOfBounds

Sparse index was outside the declared logical length.

Fields

§index: u64

Invalid sparse index.

§len: usize

Logical layer length.

§

DuplicateName

A name was reused within an ID-family namespace.

Fields

§id_family: IdFamily

ID family namespace.

§name: LayerName

Duplicate layer name.

§

SparseNullMissingNotTotal

Sparse null-missing policy cannot be selected as a total weight view.

Fields

§name: LayerName

Name of the offending layer.

§

DuplicateLayerId

A layer ID was reused within one descriptor set.

Fields

§layer_id: u64

Duplicate layer ID.

§

MissingSnapshotSection

A snapshot section was missing.

Fields

§kind: u32

Missing section kind.

§

SnapshotSectionVersion

A snapshot section had an unsupported version.

Fields

§kind: u32

Section kind.

§version: u32

Actual section version.

§

SnapshotSectionView

A snapshot section could not be borrowed as the expected record type.

Fields

§kind: u32

Section kind.

§error: SectionViewError

Underlying typed-view error.

§

SnapshotRangeOutOfBounds

Snapshot bytes ended before a declared range.

Fields

§offset: usize

Byte range start.

§len: usize

Byte range length.

§available: usize

Available section byte length.

§

SnapshotInvalidUtf8

Snapshot string table bytes were not valid UTF-8.

Fields

§offset: usize

Byte offset of the invalid string.

§

UnknownIdFamilyTag

Snapshot metadata used an unknown ID family tag.

Fields

§tag: u32

Invalid tag.

§

UnknownLayerRoleTag

Snapshot metadata used an unknown layer role tag.

Fields

§tag: u32

Invalid tag.

§

UnknownStorageTag

Snapshot metadata used an unknown storage tag.

Fields

§tag: u32

Invalid tag.

§

UnknownMissingPolicyTag

Snapshot metadata used an unknown missing-policy tag.

Fields

§tag: u32

Invalid tag.

§

UnknownArrowFamilyTag

Snapshot metadata used an unknown Arrow value-family tag.

Fields

§tag: u32

Invalid tag.

§

UnknownIdentityModeTag

Snapshot metadata used an unknown identity-map mode tag.

Fields

§tag: u32

Invalid tag.

§

SnapshotDescriptorMismatch

A property snapshot descriptor was structurally inconsistent.

Fields

§reason: &'static str

Human-readable mismatch reason.

§

SnapshotDataLength

A property data payload had an invalid byte length.

Fields

§reason: &'static str

Human-readable mismatch reason.

§

Arrow

Arrow IPC/schema validation failed.

Fields

§message: String

Arrow error message.

§

MissingIdentityMap

An explicit identity map was required but missing.

Fields

§id_family: IdFamily

ID family whose map was missing.

§

IdentityMapLength

An identity map length did not match its mode metadata.

Fields

§id_family: IdFamily

ID family whose map had the wrong length.

§required: usize

Required map length.

§actual: usize

Actual map length.

§

LengthDoesNotFitU64

A usize value could not be represented as u64.

Fields

§value: usize

Value that did not fit.

Trait Implementations§

Source§

impl Clone for PropertyError

Source§

fn clone(&self) -> PropertyError

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 PropertyError

Source§

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

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

impl Display for PropertyError

Source§

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

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

impl Error for PropertyError

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

impl PartialEq for PropertyError

Source§

fn eq(&self, other: &PropertyError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for PropertyError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

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.