[−][src]Enum rule::arg::Arg
The argument type. Each argument can be a json primitive type or a Expr
.
Variants
Bool(bool)
Int(i64)
Float(f64)
String(String)
Expr(Expr)
Methods
impl Arg
[src]
pub fn as_bool(&self) -> Option<bool>
[src]
If the Arg
is a bool, returns the associated bool. Returns None otherwise.
pub fn as_str(&self) -> Option<&str>
[src]
If the Arg
is a String, returns the associated String. Returns None otherwise.
pub fn from_json(val: Json) -> Result<Arg>
[src]
pub fn from_json_context_var(val: Json) -> Result<Arg>
[src]
pub fn from_context_var(
args: &Vec<Arg>,
context: &Map<String, Json>
) -> Result<Arg>
[src]
args: &Vec<Arg>,
context: &Map<String, Json>
) -> Result<Arg>
Trait Implementations
impl Into<String> for Arg
[src]
impl Into<i64> for Arg
[src]
impl<'a> Into<i64> for &'a Arg
[src]
impl Into<f64> for Arg
[src]
impl Into<Option<Expr>> for Arg
[src]
impl Into<Arg> for Json
[src]
impl Into<bool> for Arg
[src]
impl<'_> Into<bool> for &'_ Arg
[src]
impl<'a> From<&'a Arg> for String
[src]
impl Clone for Arg
[src]
impl PartialEq<Arg> for Arg
[src]
impl PartialOrd<Arg> for Arg
[src]
fn partial_cmp(&self, other: &Arg) -> Option<Ordering>
[src]
fn lt(&self, other: &Arg) -> bool
[src]
fn le(&self, other: &Arg) -> bool
[src]
fn gt(&self, other: &Arg) -> bool
[src]
fn ge(&self, other: &Arg) -> bool
[src]
impl Display for Arg
[src]
impl Debug for Arg
[src]
impl Div<Arg> for Arg
[src]
type Output = Arg
The resulting type after applying the /
operator.
fn div(self, rhs: Arg) -> Arg
[src]
impl Rem<Arg> for Arg
[src]
type Output = Arg
The resulting type after applying the %
operator.
fn rem(self, rhs: Arg) -> Arg
[src]
impl Sub<Arg> for Arg
[src]
type Output = Arg
The resulting type after applying the -
operator.
fn sub(self, other: Arg) -> Arg
[src]
impl Add<Arg> for Arg
[src]
type Output = Arg
The resulting type after applying the +
operator.
fn add(self, other: Arg) -> Arg
[src]
impl<'a> Add<&'a Arg> for Arg
[src]
type Output = Arg
The resulting type after applying the +
operator.
fn add(self, other: &'a Arg) -> Arg
[src]
impl Mul<Arg> for Arg
[src]
type Output = Arg
The resulting type after applying the *
operator.
fn mul(self, rhs: Arg) -> Arg
[src]
impl Neg for Arg
[src]
impl<'a> Neg for &'a Arg
[src]
Auto Trait Implementations
impl Send for Arg
impl Sync for Arg
impl Unpin for Arg
impl UnwindSafe for Arg
impl RefUnwindSafe for Arg
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,