[][src]Struct liquid::value::ScalarCow

pub struct ScalarCow<'s>(_);

A Liquid scalar value

Methods

impl<'s> ScalarCow<'s>
[src]

pub fn new<T>(value: T) -> ScalarCow<'s> where
    T: Into<ScalarCow<'s>>, 
[src]

Convert a value into a ScalarCow.

pub fn source(&self) -> ScalarSource
[src]

A Display for a Scalar as source code.

pub fn render(&self) -> ScalarRendered
[src]

A Display for a Scalar rendered for the user.

pub fn into_owned(self) -> ScalarCow<'s>
[src]

Create an owned version of the value.

pub fn as_ref<'r>(&'r self) -> ScalarCow<'r> where
    'r: 's, 
[src]

Create a reference to the value.

pub fn to_str(&self) -> Cow<str>
[src]

Interpret as a string.

pub fn into_string(self) -> String
[src]

Convert to a string.

pub fn to_integer(&self) -> Option<i32>
[src]

Interpret as an integer, if possible

pub fn to_float(&self) -> Option<f64>
[src]

Interpret as a float, if possible

pub fn to_bool(&self) -> Option<bool>
[src]

Interpret as a bool, if possible

pub fn to_date(&self) -> Option<DateTime<FixedOffset>>
[src]

Interpret as a date, if possible

pub fn is_truthy(&self) -> bool
[src]

Evaluate using Liquid "truthiness"

pub fn is_default(&self) -> bool
[src]

Whether a default constructed value.

pub fn type_name(&self) -> &'static str
[src]

Report the data type (generally for error reporting).

Trait Implementations

impl Extend<ScalarCow<'static>> for Variable
[src]

impl<'s> Clone for ScalarCow<'s>
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'s> Eq for ScalarCow<'s>
[src]

impl<'s> Extend<ScalarCow<'s>> for Path<'s>
[src]

impl<'s> From<Cow<'s, str>> for ScalarCow<'s>
[src]

impl<'s> From<DateTime<FixedOffset>> for ScalarCow<'s>
[src]

impl<'s> From<f64> for ScalarCow<'s>
[src]

impl<'s> From<&'s String> for ScalarCow<'s>
[src]

impl<'s> From<i32> for ScalarCow<'s>
[src]

impl<'s> From<&'s str> for ScalarCow<'s>
[src]

impl<'s> From<String> for ScalarCow<'s>
[src]

impl<'s> From<bool> for ScalarCow<'s>
[src]

impl<'s> PartialOrd<f64> for ScalarCow<'s>
[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'s> PartialOrd<i32> for ScalarCow<'s>
[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'s> PartialOrd<bool> for ScalarCow<'s>
[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'s> PartialOrd<str> for ScalarCow<'s>
[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'s> PartialOrd<ScalarCow<'s>> for ScalarCow<'s>
[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'s> PartialOrd<DateTime<FixedOffset>> for ScalarCow<'s>
[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'s> Debug for ScalarCow<'s>
[src]

impl<'s> PartialEq<str> for ScalarCow<'s>
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl<'s> PartialEq<ScalarCow<'s>> for ScalarCow<'s>
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl<'s> PartialEq<i32> for ScalarCow<'s>
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl<'s> PartialEq<DateTime<FixedOffset>> for ScalarCow<'s>
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl<'s> PartialEq<f64> for ScalarCow<'s>
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl<'s> PartialEq<bool> for ScalarCow<'s>
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl<'de, 's> Deserialize<'de> for ScalarCow<'s>
[src]

impl<'s> Serialize for ScalarCow<'s>
[src]

Auto Trait Implementations

impl<'s> Send for ScalarCow<'s>

impl<'s> Sync for ScalarCow<'s>

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Any for T where
    T: Any

impl<T> CloneAny for T where
    T: Clone + Any