[−][src]Struct liquid_value::ScalarCow
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 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) -> Self
[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 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<Date>
[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<'s> From<i32> for ScalarCow<'s>
[src]
impl<'s> From<f64> for ScalarCow<'s>
[src]
impl<'s> From<bool> for ScalarCow<'s>
[src]
impl<'s> From<DateTime<FixedOffset>> for ScalarCow<'s>
[src]
impl<'s> From<String> 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<Cow<'s, str>> for ScalarCow<'s>
[src]
impl<'s> Extend<ScalarCow<'s>> for Path<'s>
[src]
fn extend<T: IntoIterator<Item = ScalarCow<'s>>>(&mut self, iter: T)
[src]
impl<'s> Clone for ScalarCow<'s>
[src]
impl<'s> Eq for ScalarCow<'s>
[src]
impl<'s> PartialEq<ScalarCow<'s>> for ScalarCow<'s>
[src]
impl<'s> PartialEq<i32> for ScalarCow<'s>
[src]
impl<'s> PartialEq<f64> for ScalarCow<'s>
[src]
impl<'s> PartialEq<bool> for ScalarCow<'s>
[src]
impl<'s> PartialEq<DateTime<FixedOffset>> for ScalarCow<'s>
[src]
impl<'s> PartialEq<str> for ScalarCow<'s>
[src]
impl<'s> PartialOrd<ScalarCow<'s>> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialOrd<i32> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &i32) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialOrd<f64> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &f64) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialOrd<bool> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &bool) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialOrd<DateTime<FixedOffset>> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &Date) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialOrd<str> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &str) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> Debug for ScalarCow<'s>
[src]
impl<'s> Serialize for ScalarCow<'s>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de, 's> Deserialize<'de> for ScalarCow<'s>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl<'s> Send for ScalarCow<'s>
impl<'s> Sync for ScalarCow<'s>
impl<'s> Unpin for ScalarCow<'s>
impl<'s> UnwindSafe for ScalarCow<'s>
impl<'s> RefUnwindSafe for ScalarCow<'s>
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, 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,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,