[][src]Enum rebound::error::Error

pub enum Error {
    WrongType {
        wrong_ty: Type,
        right_ty: Type,
    },
    IsDynamic,
    IsStatic,
    WrongArgsNum {
        wrong_num: usize,
        right_num: usize,
    },
    BorrowedValue,
    UnsupportedOperation,
    CantReborrow,
    WrongVariant {
        wrong_var: Variant,
        right_var: Variant,
    },
}

An error during a reflection operation. Note that during, for example, a call that returns an Error, this will not represent the call returning an error. It would instead represent the call failing to occur, or panicking and that panic being caught.

Variants

WrongType

A Value with an incorrect Type was passed to an operation

Fields of WrongType

wrong_ty: Type

The incorrect type passed

right_ty: Type

The type that was expected

IsDynamic

Attempted to call an AssocFn without a self param, but the referenced function expects one

IsStatic

Attempted to call an AssocFn with a self param, but the referenced function doesn't expect one

WrongArgsNum

Attempted to call an AssocFn with different number of arguments than expected by the referenced function.

Fields of WrongArgsNum

wrong_num: usize

The number of args passed

right_num: usize

The number of args expected

BorrowedValue

Attempted to perform an operation on a Value that requires the Value to be Owned, but it was Borrowed.

UnsupportedOperation

Attempted to perform an operation on an AssocFn or Field, which isn't supported by that item.

CantReborrow

Attempted to call as_ref/as_mut on a reference, which can't be reborrowed as the desired reference type.

WrongVariant

Attempted to perform an operation on an Enum with a Value of the wrong Variant

Fields of WrongVariant

wrong_var: Variantright_var: Variant

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.