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
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
ArrayLengthMismatch
A flat buffer length does not match a general-dimensional shape.
Fields
ShapeOverflow
Multiplying the dimensions of an array shape overflowed addressable storage.
NonStandardLayout
An ndarray input is not C-contiguous standard row-major storage.
Fields
NdarrayShape(ShapeError)
ndarray rejected a requested shape or storage layout.
FrameOutOfRange
A requested acquisition-frame index is outside 0..frames.
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.
InvalidManifest(String)
A bundle manifest is malformed or violates the bundle contract.
MissingArtifact
A manifest-declared bundle artifact is absent.
ArtifactHashMismatch
A bundle artifact’s bytes do not match its declared SHA-256 digest.
InvalidParquetSchema
A Parquet artifact does not have the schema required for its role.
Fields
InconsistentRunId
Artifacts within one bundle disagree about the run identifier.
Fields
InvalidArrayShape
A stored NPY array has a shape inconsistent with its artifact role.
Fields
InvalidArrayDtype
A stored NPY array has the wrong element dtype for its role.
Fields
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 Error for Error
impl Error for Error
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 From<ShapeError> for Error
impl From<ShapeError> for Error
Source§fn from(source: ShapeError) -> Self
fn from(source: ShapeError) -> Self
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> 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
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more