pub enum ArrayFromTupleError<T> {
NotEnoughElements {
expected_len: usize,
actual_len: usize,
},
ElementFromObject {
element_idx: usize,
error: T,
},
}Expand description
The error type returned when trying to convert an Array into a tuple.
Variants§
NotEnoughElements
Not enough elements in the array.
ElementFromObject
The tuple element at the given index couldn’t be converted into the requested type.
Trait Implementations§
Source§impl<T> Debug for ArrayFromTupleError<T>where
T: Debug,
impl<T> Debug for ArrayFromTupleError<T>where
T: Debug,
Source§impl<T> Display for ArrayFromTupleError<T>where
T: Debug,
impl<T> Display for ArrayFromTupleError<T>where
T: Debug,
Source§impl<T> Error for ArrayFromTupleError<T>
impl<T> Error for ArrayFromTupleError<T>
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<T> PartialEq for ArrayFromTupleError<T>where
T: PartialEq,
impl<T> PartialEq for ArrayFromTupleError<T>where
T: PartialEq,
impl<T> Eq for ArrayFromTupleError<T>where
T: Eq,
impl<T> StructuralPartialEq for ArrayFromTupleError<T>
Auto Trait Implementations§
impl<T> Freeze for ArrayFromTupleError<T>where
T: Freeze,
impl<T> RefUnwindSafe for ArrayFromTupleError<T>where
T: RefUnwindSafe,
impl<T> Send for ArrayFromTupleError<T>where
T: Send,
impl<T> Sync for ArrayFromTupleError<T>where
T: Sync,
impl<T> Unpin for ArrayFromTupleError<T>where
T: Unpin,
impl<T> UnwindSafe for ArrayFromTupleError<T>where
T: UnwindSafe,
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<E> ExternalError for E
impl<E> ExternalError for E
fn into_lua_err(self) -> Error
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 moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§type Error = Infallible
type Error = Infallible
The error type in the returned
Result.Source§fn into_result(self) -> Result<T, <T as IntoResult<T>>::Error>
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Error>
Converts the value into a
Result.