[][src]Enum uclicious::raw::object::ObjectError

pub enum ObjectError {
    KeyNotFound(String),
    WrongType {
        key: String,
        actual_type: ucl_type_t,
        wanted_type: ucl_type_t,
    },
    IntConversionError(TryFromIntError),
    AddrParseError(AddrParseError),
    Other(String),
    None,
}

Errors that could be returned by Object or ObjectRef functions.

Variants

KeyNotFound(String)
WrongType

Object was found, but value type doesn't match the desired type.

NOTE: Error only returned when conversion is done by FromObject trait. Built-in functions return None.

Fields of WrongType

key: Stringactual_type: ucl_type_twanted_type: ucl_type_t
IntConversionError(TryFromIntError)

Wrapper around TryFromIntError.

AddrParseError(AddrParseError)

Wrapper around AddrParseError.

Other(String)

An error that we couldn't match to internal type.

None

Not an error, but required for some conversions.

Methods

impl ObjectError[src]

pub fn boxed(self) -> Box<ObjectError>[src]

Wrap error in Box<>.

pub fn boxed_dyn(self) -> Box<dyn Error>[src]

Wrap error in Box<> and erase its type.

pub fn other<E: Display>(err: E) -> ObjectError[src]

Create a new error Other by extracting the error description.

Trait Implementations

impl Clone for ObjectError[src]

impl Debug for ObjectError[src]

impl Display for ObjectError[src]

impl Eq for ObjectError[src]

impl Error for ObjectError[src]

impl From<AddrParseError> for ObjectError[src]

impl From<Infallible> for ObjectError[src]

impl From<TryFromIntError> for ObjectError[src]

impl PartialEq<ObjectError> for ObjectError[src]

impl StructuralEq for ObjectError[src]

impl StructuralPartialEq for ObjectError[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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: FromObject<T>, 
[src]

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.