Enum darklua_core::rules::RuleConfigurationError[][src]

pub enum RuleConfigurationError {
    UnexpectedProperty(String),
    MissingProperty(String),
    BooleanExpected(String),
    StringExpected(String),
    UsizeExpected(String),
    FloatExpected(String),
    StringListExpected(String),
    UnexpectedValueType(String),
    UnexpectedValue {
        property: String,
        message: String,
    },
    PropertyCollision(Vec<String>),
}
Expand description

When implementing the configure method of the Rule trait, the method returns a result that uses this error type.

Variants

UnexpectedProperty(String)

Tuple Fields

0: String

When a rule gets an unknown property. The string should be the unknown field name.

MissingProperty(String)

Tuple Fields

0: String

When a rule has a required property. The string should be the field name.

BooleanExpected(String)

Tuple Fields

0: String

When a property is associated with something else than an expected boolean. The string is the property name.

StringExpected(String)

Tuple Fields

0: String

When a property is associated with something else than an expected string. The string is the property name.

UsizeExpected(String)

Tuple Fields

0: String

When a property is associated with something else than an expected unsigned number. The string is the property name.

FloatExpected(String)

Tuple Fields

0: String

When a property is associated with something else than an expected float. The string is the property name.

StringListExpected(String)

Tuple Fields

0: String

When a property is associated with something else than an expected list of strings. The string is the property name.

UnexpectedValueType(String)

Tuple Fields

0: String

When the value type is invalid. The string is the property name that was given the wrong value type.

UnexpectedValue

Fields

property: String
message: String

When the value is invalid.

PropertyCollision(Vec<String>)

Tuple Fields

0: Vec<String>

When a rule cannot have multiple properties defined at the same time.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

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.