pub enum WasmError {
InvalidHandle {
entity: &'static str,
index: usize,
},
InvalidInput {
reason: String,
},
Operations(OperationsError),
Topology(TopologyError),
Math(MathError),
}Expand description
Errors that can occur in WASM-exposed operations.
Variants§
InvalidHandle
A JS-provided handle index does not correspond to a valid entity.
Fields
InvalidInput
An input value is invalid (NaN, infinite, out of range, etc.).
Operations(OperationsError)
An error from a modeling operation.
Topology(TopologyError)
An error from topology lookup.
Math(MathError)
A math error (e.g. singular matrix).
Trait Implementations§
Source§impl Error for WasmError
impl Error for WasmError
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()
Source§impl From<OperationsError> for WasmError
impl From<OperationsError> for WasmError
Source§fn from(source: OperationsError) -> Self
fn from(source: OperationsError) -> Self
Converts to this type from the input type.
Source§impl From<TopologyError> for WasmError
impl From<TopologyError> for WasmError
Source§fn from(source: TopologyError) -> Self
fn from(source: TopologyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for WasmError
impl RefUnwindSafe for WasmError
impl Send for WasmError
impl Sync for WasmError
impl Unpin for WasmError
impl UnsafeUnpin for WasmError
impl UnwindSafe for WasmError
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> 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 more