pub enum RuleConfigurationError {
Show 13 variants
UnexpectedProperty(String),
MissingProperty(String),
MissingAnyProperty(Vec<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.
MissingAnyProperty(Vec<String>)
When a rule must define at least one property in a given set.
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 for RuleConfigurationError
impl PartialEq for RuleConfigurationError
impl Eq for RuleConfigurationError
impl StructuralPartialEq for RuleConfigurationError
Auto Trait Implementations§
impl Freeze for RuleConfigurationError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
Source§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Source§impl<T> Indentable for Twhere
T: Display,
impl<T> Indentable for Twhere
T: Display,
Source§fn indented_skip_initial(self, indent: &str) -> IndentedSkipIntial<'_, Self>
fn indented_skip_initial(self, indent: &str) -> IndentedSkipIntial<'_, Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more