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)
When a rule gets an unknown property. The string should be the unknown field name.
MissingProperty(String)
When a rule has a required property. The string should be the field name.
BooleanExpected(String)
When a property is associated with something else than an expected boolean. The string is the property name.
StringExpected(String)
When a property is associated with something else than an expected string. The string is the property name.
UsizeExpected(String)
When a property is associated with something else than an expected unsigned number. The string is the property name.
FloatExpected(String)
When a property is associated with something else than an expected float. The string is the property name.
StringListExpected(String)
When a property is associated with something else than an expected list of strings. The string is the property name.
UnexpectedValueType(String)
When the value type is invalid. The string is the property name that was given the wrong value type.
UnexpectedValue
When the value is invalid.
PropertyCollision(Vec<String>)
When a rule cannot have multiple properties defined at the same time.
Trait Implementations§
source§impl Clone for RuleConfigurationError
impl Clone for RuleConfigurationError
source§fn clone(&self) -> RuleConfigurationError
fn clone(&self) -> RuleConfigurationError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for RuleConfigurationError
impl Debug for RuleConfigurationError
source§impl Display for RuleConfigurationError
impl Display for RuleConfigurationError
source§impl PartialEq<RuleConfigurationError> for RuleConfigurationError
impl PartialEq<RuleConfigurationError> for RuleConfigurationError
source§fn eq(&self, other: &RuleConfigurationError) -> bool
fn eq(&self, other: &RuleConfigurationError) -> bool
self and other values to be equal, and is used
by ==.