Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 30 variants InvalidShape(String), InvalidParameter { name: &'static str, reason: String, }, InvalidModel(String), InvalidMeasurements(String), LengthMismatch { actual: usize, expected: usize, shape: (usize, usize), }, ArrayLengthMismatch { actual: usize, expected: usize, shape: Vec<usize>, }, ShapeOverflow { shape: Vec<usize>, }, NonStandardLayout { context: &'static str, shape: Vec<usize>, strides: Vec<isize>, }, NdarrayShape(ShapeError), FrameOutOfRange { index: usize, frames: usize, }, Numerical(String), Unsupported(String), Dataset(String), UnsupportedBundleVersion { actual: u32, supported: u32, }, InvalidManifest(String), MissingArtifact { role: String, }, ArtifactHashMismatch { role: String, }, InvalidParquetSchema { role: String, reason: String, }, InconsistentRunId { expected: String, actual: String, }, InvalidArrayShape { role: String, reason: String, }, InvalidArrayDtype { role: String, actual: String, expected: String, }, UnsupportedArtifactRole(String), InvalidRelativePath(String), IncompleteBundle(String), Polars(PolarsError), Io(Error), Csv(Error), Image(ImageError), Tiff(TiffError), Serialization(Error),
}
Expand description

Errors produced by fpm-rs public operations.

Variants§

§

InvalidShape(String)

A supplied or derived array shape is empty, inconsistent, or unsupported.

§

InvalidParameter

A named scalar or option falls outside its accepted domain.

Fields

§name: &'static str

Stable parameter name.

§reason: String

Explanation of the rejected value or relationship.

§

InvalidModel(String)

A compiled image-plane model violates a model invariant.

§

InvalidMeasurements(String)

Measurements or their metadata are incompatible or invalid.

§

LengthMismatch

A flat two-dimensional buffer length does not match its (height, width) shape.

Fields

§actual: usize

Number of supplied elements.

§expected: usize

Number of elements required by shape.

§shape: (usize, usize)

Requested (height, width) shape.

§

ArrayLengthMismatch

A flat buffer length does not match a general-dimensional shape.

Fields

§actual: usize

Number of supplied elements.

§expected: usize

Number of required elements.

§shape: Vec<usize>

Requested axis lengths.

§

ShapeOverflow

Multiplying the dimensions of an array shape overflowed addressable storage.

Fields

§shape: Vec<usize>

Axis lengths whose product overflowed.

§

NonStandardLayout

An ndarray input is not C-contiguous standard row-major storage.

Fields

§context: &'static str

User-facing name of the offending value.

§shape: Vec<usize>

Logical axis lengths.

§strides: Vec<isize>

Element strides reported by ndarray.

§

NdarrayShape(ShapeError)

ndarray rejected a requested shape or storage layout.

§

FrameOutOfRange

A requested acquisition-frame index is outside 0..frames.

Fields

§index: usize

Requested zero-based frame index.

§frames: usize

Available frame count.

§

Numerical(String)

A numerical operation produced an invalid or unusable value.

§

Unsupported(String)

The requested operation is not implemented for the supplied input.

§

Dataset(String)

Dataset discovery, download, verification, or loading failed.

§

UnsupportedBundleVersion

A result or benchmark bundle uses an unsupported manifest version.

Fields

§actual: u32

Version found in the manifest.

§supported: u32

Version supported by this build.

§

InvalidManifest(String)

A bundle manifest is malformed or violates the bundle contract.

§

MissingArtifact

A manifest-declared bundle artifact is absent.

Fields

§role: String

Stable artifact role from the manifest.

§

ArtifactHashMismatch

A bundle artifact’s bytes do not match its declared SHA-256 digest.

Fields

§role: String

Stable artifact role from the manifest.

§

InvalidParquetSchema

A Parquet artifact does not have the schema required for its role.

Fields

§role: String

Stable artifact role from the manifest.

§reason: String

Description of the schema mismatch.

§

InconsistentRunId

Artifacts within one bundle disagree about the run identifier.

Fields

§expected: String

Run identifier required by the bundle manifest.

§actual: String

Run identifier found in an artifact.

§

InvalidArrayShape

A stored NPY array has a shape inconsistent with its artifact role.

Fields

§role: String

Stable array role from the manifest.

§reason: String

Description of the shape mismatch.

§

InvalidArrayDtype

A stored NPY array has the wrong element dtype for its role.

Fields

§role: String

Stable array role from the manifest.

§actual: String

Dtype encoded by the array file.

§expected: String

Dtype required for the artifact role.

§

UnsupportedArtifactRole(String)

A bundle manifest names an artifact role unknown to this version.

§

InvalidRelativePath(String)

A bundle artifact path is absolute or escapes the bundle directory.

§

IncompleteBundle(String)

A temporary bundle workspace is missing required output before publication.

§

Polars(PolarsError)

An operation delegated to Polars failed.

§

Io(Error)

A filesystem or stream operation failed.

§

Csv(Error)

Reading or writing CSV data failed.

§

Image(ImageError)

Decoding or encoding a general image failed.

§

Tiff(TiffError)

Reading a TIFF stack failed.

§

Serialization(Error)

JSON serialization or deserialization failed.

Trait Implementations§

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

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 From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ImageError> for Error

Source§

fn from(source: ImageError) -> Self

Converts to this type from the input type.
Source§

impl From<PolarsError> for Error

Source§

fn from(source: PolarsError) -> Self

Converts to this type from the input type.
Source§

impl From<ShapeError> for Error

Source§

fn from(source: ShapeError) -> Self

Converts to this type from the input type.
Source§

impl From<TiffError> for Error

Source§

fn from(source: TiffError) -> Self

Converts to this type from the input type.

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

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ToCompactString for T
where T: Display,

§

fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>

Fallible version of [ToCompactString::to_compact_string()] Read more
§

fn to_compact_string(&self) -> CompactString

Converts the given value to a [CompactString]. 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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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

§

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

§

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