pub enum InvalidInputError {
InvalidType(Cow<'static, str>),
Resource(ResourceError),
}Expand description
Error returned when a MontyObject cannot be used as an input to code execution.
This can occur when:
- A
MontyObjectvariant (likeRepr) is only valid as an output, not an input - A resource limit is exceeded during conversion
Variants§
InvalidType(Cow<'static, str>)
The input type is not valid for conversion to a runtime Value. Message explaining why the type is invalid.
Resource(ResourceError)
A resource limit was exceeded during conversion.
Implementations§
Source§impl InvalidInputError
impl InvalidInputError
Sourcepub fn invalid_type(msg: impl Into<Cow<'static, str>>) -> Self
pub fn invalid_type(msg: impl Into<Cow<'static, str>>) -> Self
Creates a new InvalidInputError for the given type name.
Trait Implementations§
Source§impl Clone for InvalidInputError
impl Clone for InvalidInputError
Source§fn clone(&self) -> InvalidInputError
fn clone(&self) -> InvalidInputError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InvalidInputError
impl Debug for InvalidInputError
Source§impl Display for InvalidInputError
impl Display for InvalidInputError
Source§impl Error for InvalidInputError
impl Error for InvalidInputError
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()
Source§impl From<ResourceError> for InvalidInputError
impl From<ResourceError> for InvalidInputError
Source§fn from(err: ResourceError) -> Self
fn from(err: ResourceError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InvalidInputError
impl RefUnwindSafe for InvalidInputError
impl Send for InvalidInputError
impl Sync for InvalidInputError
impl Unpin for InvalidInputError
impl UnsafeUnpin for InvalidInputError
impl UnwindSafe for InvalidInputError
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