pub enum FlameError {
Show 16 variants
Io(Error),
NpyLoad {
name: String,
source: ReadNpyError,
},
ShapeMismatch {
name: String,
expected: String,
got: String,
},
ModelDir(String),
InvalidParams(String),
Export {
format: String,
reason: String,
},
Animation {
frame: usize,
reason: String,
},
Landmark {
index: usize,
reason: String,
},
Transfer {
reason: String,
},
Numerical {
reason: String,
},
IndexOutOfBounds {
context: String,
index: usize,
len: usize,
},
SafeTensorsLoad {
path: PathBuf,
message: String,
},
SafeTensorsSave {
path: PathBuf,
message: String,
},
SafeTensorsMissing {
name: String,
message: String,
},
SafeTensorsInvalidDtype {
name: String,
expected: String,
got: String,
},
IoError {
source: Error,
path: PathBuf,
},
}Expand description
Errors that can occur when working with the FLAME model.
Variants§
Io(Error)
I/O error reading model files.
NpyLoad
Error loading .npy array data.
ShapeMismatch
Array shape does not match expected dimensions.
ModelDir(String)
Model directory does not exist or is missing required files.
InvalidParams(String)
Invalid parameter dimensions.
Export
Export failed (OBJ/PLY/glTF).
Fields
Animation
Animation sequence error.
Landmark
Landmark detection or projection error.
Fields
Transfer
Expression transfer failure.
Numerical
Numerical computation error (e.g., matrix inversion failure).
IndexOutOfBounds
Index out of bounds error.
Fields
SafeTensorsLoad
Error loading safetensors file.
SafeTensorsSave
Error saving safetensors file.
SafeTensorsMissing
Missing tensor in safetensors file.
SafeTensorsInvalidDtype
Invalid dtype in safetensors tensor.
IoError
I/O error with path context.
Implementations§
Source§impl FlameError
impl FlameError
Sourcepub fn export(format: impl Into<String>, reason: impl Into<String>) -> Self
pub fn export(format: impl Into<String>, reason: impl Into<String>) -> Self
Create an export error with format and reason.
Sourcepub fn animation(frame: usize, reason: impl Into<String>) -> Self
pub fn animation(frame: usize, reason: impl Into<String>) -> Self
Create an animation error with frame and reason.
Trait Implementations§
Source§impl Debug for FlameError
impl Debug for FlameError
Source§impl Display for FlameError
impl Display for FlameError
Source§impl Error for FlameError
impl Error for FlameError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for FlameError
impl !RefUnwindSafe for FlameError
impl Send for FlameError
impl Sync for FlameError
impl Unpin for FlameError
impl UnsafeUnpin for FlameError
impl !UnwindSafe for FlameError
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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 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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.