Struct liquid_value::Scalar [−][src]
pub struct Scalar(_);
A Liquid scalar value
Methods
impl Scalar[src]
impl Scalarpub fn new<T: Into<Self>>(value: T) -> Self[src]
pub fn new<T: Into<Self>>(value: T) -> SelfConvert a value into a Scalar.
pub fn to_str(&self) -> Cow<str>[src]
pub fn to_str(&self) -> Cow<str>Interpret as a string.
pub fn into_string(self) -> String[src]
pub fn into_string(self) -> StringConvert to a string.
pub fn to_integer(&self) -> Option<i32>[src]
pub fn to_integer(&self) -> Option<i32>Interpret as an integer, if possible
pub fn to_float(&self) -> Option<f64>[src]
pub fn to_float(&self) -> Option<f64>Interpret as an float, if possible
pub fn to_bool(&self) -> Option<bool>[src]
pub fn to_bool(&self) -> Option<bool>Interpret as an bool, if possible
pub fn to_date(&self) -> Option<Date>[src]
pub fn to_date(&self) -> Option<Date>Interpret as an bool, if possible
pub fn is_truthy(&self) -> bool[src]
pub fn is_truthy(&self) -> boolEvaluate using Liquid "truthiness"
pub fn is_default(&self) -> bool[src]
pub fn is_default(&self) -> boolWhether a default constructed value.
pub fn type_name(&self) -> &'static str[src]
pub fn type_name(&self) -> &'static strReport the data type (generally for error reporting).
Trait Implementations
impl Extend<Scalar> for Path[src]
impl Extend<Scalar> for Pathfn extend<T: IntoIterator<Item = Scalar>>(&mut self, iter: T)[src]
fn extend<T: IntoIterator<Item = Scalar>>(&mut self, iter: T)Extends a collection with the contents of an iterator. Read more
impl FromIterator<Scalar> for Path[src]
impl FromIterator<Scalar> for Pathfn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = Scalar>, [src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = Scalar>, Creates a value from an iterator. Read more
impl Clone for Scalar[src]
impl Clone for Scalarfn clone(&self) -> Scalar[src]
fn clone(&self) -> ScalarReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for Scalar[src]
impl Debug for Scalarfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl From<i32> for Scalar[src]
impl From<i32> for Scalarimpl From<f64> for Scalar[src]
impl From<f64> for Scalarimpl From<bool> for Scalar[src]
impl From<bool> for Scalarimpl From<Date> for Scalar[src]
impl From<Date> for Scalarimpl From<String> for Scalar[src]
impl From<String> for Scalarimpl<'a> From<&'a String> for Scalar[src]
impl<'a> From<&'a String> for Scalarimpl From<&'static str> for Scalar[src]
impl From<&'static str> for Scalarimpl PartialEq<Scalar> for Scalar[src]
impl PartialEq<Scalar> for Scalarfn eq(&self, other: &Self) -> bool[src]
fn eq(&self, other: &Self) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Eq for Scalar[src]
impl Eq for Scalarimpl PartialOrd<Scalar> for Scalar[src]
impl PartialOrd<Scalar> for Scalarfn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Rhs) -> bool1.0.0[src]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Display for Scalar[src]
impl Display for Scalar