pub enum ConversionReason {
Type {
expected: &'static str,
actual: MiraType,
},
Number {
expected: &'static str,
value: f64,
},
}Expand description
The reason a MiraScript value could not be converted to a Rust type.
Variants§
Type
The MiraScript value has the wrong category.
Number
A number cannot be represented by the requested Rust type.
Trait Implementations§
Source§impl Debug for ConversionReason
impl Debug for ConversionReason
Source§impl Display for ConversionReason
impl Display for ConversionReason
Source§impl Error for ConversionReason
impl Error for ConversionReason
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 ConversionReason
impl RefUnwindSafe for ConversionReason
impl Send for ConversionReason
impl Sync for ConversionReason
impl Unpin for ConversionReason
impl UnsafeUnpin for ConversionReason
impl UnwindSafe for ConversionReason
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