pub enum LercError {
InvalidArgument,
LercStatus(LercStatus),
UnknownStatus(u32),
}Expand description
Represents possible errors returned by LERC operations.
Variants§
InvalidArgument
The input arguments were invalid, such as mismatched dimensions or null pointers.
LercStatus(LercStatus)
The LERC C API returned a known failure code.
UnknownStatus(u32)
The LERC C API returned an unknown status code.
Implementations§
Source§impl LercError
impl LercError
Sourcepub const fn from_status(code: u32) -> Self
pub const fn from_status(code: u32) -> Self
Converts a raw status code returned from the LERC C API into a LercError.
Known values are mapped to [LercStatus] variants inside LercError::LercStatus,
and unknown codes are wrapped in LercError::UnknownStatus.
§Parameters
code: The numeric status code returned by a LERC function.
§Returns
A corresponding LercError variant.
Trait Implementations§
Source§impl Error for LercError
impl Error for LercError
1.30.0 · 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 LercError
impl RefUnwindSafe for LercError
impl Send for LercError
impl Sync for LercError
impl Unpin for LercError
impl UnwindSafe for LercError
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