pub enum ValueConvertError {
TypeMismatch(Value),
NotUtf8(Vec<u8>),
ParseError(Type, String),
ValueNotSupported(Box<dyn Debug + Send>),
FloatIsNan,
}
Expand description
Describes an error occurring when converting from or into a value.
Variants§
TypeMismatch(Value)
The target type could not be created from the given value.
NotUtf8(Vec<u8>)
Given bytes are expected to be utf-8 coded.
ParseError(Type, String)
Could not parse value given as string into type.
ValueNotSupported(Box<dyn Debug + Send>)
The given value is not supported by the interpreter.
FloatIsNan
The given float is NaN.
Trait Implementations§
Source§impl Debug for ValueConvertError
impl Debug for ValueConvertError
Source§impl Display for ValueConvertError
impl Display for ValueConvertError
Source§impl Error for ValueConvertError
impl Error for ValueConvertError
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<ValueConvertError> for EventFactoryError
impl From<ValueConvertError> for EventFactoryError
Source§fn from(value: ValueConvertError) -> Self
fn from(value: ValueConvertError) -> Self
Converts to this type from the input type.
Source§impl From<ValueConvertError> for FromValuesError
impl From<ValueConvertError> for FromValuesError
Source§fn from(value: ValueConvertError) -> Self
fn from(value: ValueConvertError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ValueConvertError
impl !RefUnwindSafe for ValueConvertError
impl Send for ValueConvertError
impl !Sync for ValueConvertError
impl Unpin for ValueConvertError
impl !UnwindSafe for ValueConvertError
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