[][src]Struct liquid_value::scalar::ScalarCow

#[repr(transparent)]pub struct ScalarCow<'s>(_);

A Liquid scalar value

Methods

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

pub fn new<T: Into<Self>>(value: T) -> Self[src]

Convert a value into a ScalarCow.

pub fn into_owned(self) -> Scalar[src]

Create an owned version of the value.

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

Create a reference to the value.

pub fn as_view<'r: 's>(&'r self) -> &'s dyn ValueView[src]

Create a reference to the value.

pub fn into_string(self) -> KString[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_time(&self) -> Option<DateTime>[src]

Interpret as a date time, if possible

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

Interpret as a date time, if possible

Trait Implementations

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

impl From<ScalarCow<'static>> for ValueCow<'static>[src]

impl From<ScalarCow<'static>> for Value[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Auto Trait Implementations

impl<'s> RefUnwindSafe for ScalarCow<'s>

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

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

impl<'s> Unpin for ScalarCow<'s>

impl<'s> UnwindSafe for ScalarCow<'s>

Blanket Implementations

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

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.