Enum darklua_core::rules::RulePropertyValue
source · pub enum RulePropertyValue {
Boolean(bool),
String(String),
Usize(usize),
Float(f64),
StringList(Vec<String>),
RequireMode(RequireMode),
None,
}
Expand description
In order to be able to weakly-type the properties of any rule, this enum makes it possible to easily use serde to gather the value associated with a property.
Variants§
Boolean(bool)
String(String)
Usize(usize)
Float(f64)
StringList(Vec<String>)
RequireMode(RequireMode)
None
Trait Implementations§
source§impl Debug for RulePropertyValue
impl Debug for RulePropertyValue
source§impl<'de> Deserialize<'de> for RulePropertyValue
impl<'de> Deserialize<'de> for RulePropertyValue
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&RequireMode> for RulePropertyValue
impl From<&RequireMode> for RulePropertyValue
source§fn from(value: &RequireMode) -> Self
fn from(value: &RequireMode) -> Self
Converts to this type from the input type.
source§impl From<&String> for RulePropertyValue
impl From<&String> for RulePropertyValue
source§impl From<&str> for RulePropertyValue
impl From<&str> for RulePropertyValue
source§impl<T: Into<RulePropertyValue>> From<Option<T>> for RulePropertyValue
impl<T: Into<RulePropertyValue>> From<Option<T>> for RulePropertyValue
source§impl From<String> for RulePropertyValue
impl From<String> for RulePropertyValue
source§impl From<bool> for RulePropertyValue
impl From<bool> for RulePropertyValue
source§impl From<f64> for RulePropertyValue
impl From<f64> for RulePropertyValue
source§impl From<usize> for RulePropertyValue
impl From<usize> for RulePropertyValue
source§impl PartialEq<RulePropertyValue> for RulePropertyValue
impl PartialEq<RulePropertyValue> for RulePropertyValue
source§fn eq(&self, other: &RulePropertyValue) -> bool
fn eq(&self, other: &RulePropertyValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for RulePropertyValue
impl Serialize for RulePropertyValue
impl StructuralPartialEq for RulePropertyValue
Auto Trait Implementations§
impl RefUnwindSafe for RulePropertyValue
impl Send for RulePropertyValue
impl Sync for RulePropertyValue
impl Unpin for RulePropertyValue
impl UnwindSafe for RulePropertyValue
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
Mutably borrows from an owned value. Read more
§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original
input to the nom parser, extract more the useful context information. Read more
§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
§fn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom,
recreate a context in the original string where the error occurred. Read more