pub enum RuleConfigurationError {
UnexpectedProperty(String),
MissingProperty(String),
BooleanExpected(String),
StringExpected(String),
UsizeExpected(String),
FloatExpected(String),
StringListExpected(String),
RequireModeExpected(String),
UnexpectedValueType(String),
UnexpectedValue {
property: String,
message: String,
},
PropertyCollision(Vec<String>),
InternalUsageOnly(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.
RequireModeExpected(String)
When a property is associated with something else than an expected require mode. 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.
InternalUsageOnly(String)
When a rule can only be used internally by darklua. The string is the rule name (this error should not surface to external consumers)
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 ==
.impl Eq for RuleConfigurationError
impl StructuralEq for RuleConfigurationError
impl StructuralPartialEq for RuleConfigurationError
Auto Trait Implementations§
impl RefUnwindSafe for RuleConfigurationError
impl Send for RuleConfigurationError
impl Sync for RuleConfigurationError
impl Unpin for RuleConfigurationError
impl UnwindSafe for RuleConfigurationError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.