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 for RulePropertyValue
impl PartialEq for RulePropertyValue
Source§impl Serialize for RulePropertyValue
impl Serialize for RulePropertyValue
impl StructuralPartialEq for RulePropertyValue
Auto Trait Implementations§
impl Freeze for RulePropertyValue
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
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)
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
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>
Converts
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>
Converts
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 moreSource§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
Source§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