Enum fungui::Error

source ·
pub enum Error<'a> {
    UnknownVariable {
        name: &'a str,
    },
    IncompatibleTypeOp {
        op: &'static str,
        ty: &'static str,
    },
    IncompatibleTypesOp {
        op: &'static str,
        left_ty: &'static str,
        right_ty: &'static str,
    },
    Custom {
        reason: String,
    },
    CustomStatic {
        reason: &'static str,
    },
    MissingParameter {
        position: i32,
        name: &'static str,
    },
}
Expand description

The error type used in FunGUI

Variants§

§

UnknownVariable

Fields

§name: &'a str

The name of the variable

An unknown variable was used

§

IncompatibleTypeOp

Fields

§op: &'static str

The operator

§ty: &'static str

The incorrect type

An incompatible type was used with the given operator

§

IncompatibleTypesOp

Fields

§op: &'static str

The operator

§left_ty: &'static str

The type of the left hand side

§right_ty: &'static str

The type of the right hand side

An incompatible pair of types was used with the given operator

§

Custom

Fields

§reason: String

The reason

A custom reason

§

CustomStatic

Fields

§reason: &'static str

The reason

A custom reason without allocating

§

MissingParameter

Fields

§position: i32

The parameter position

§name: &'static str

The parameter name

The parameter at the given position is missing

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.