Struct liquid_compiler::value::Scalar
source · pub struct Scalar(_);Expand description
A Liquid scalar value
Implementations
sourceimpl Scalar
impl Scalar
sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Convert to a string.
sourcepub fn to_integer(&self) -> Option<i32>
pub fn to_integer(&self) -> Option<i32>
Interpret as an integer, if possible
sourcepub fn to_date(&self) -> Option<DateTime<FixedOffset>>
pub fn to_date(&self) -> Option<DateTime<FixedOffset>>
Interpret as a date, if possible
sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Whether a default constructed value.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Scalar
impl<'de> Deserialize<'de> for Scalar
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Scalar, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Scalar, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Extend<Scalar> for Path
impl Extend<Scalar> for Path
sourcefn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Scalar>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = Scalar>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl From<DateTime<FixedOffset>> for Scalar
impl From<DateTime<FixedOffset>> for Scalar
sourcefn from(s: DateTime<FixedOffset>) -> Scalar
fn from(s: DateTime<FixedOffset>) -> Scalar
Converts to this type from the input type.
sourceimpl FromIterator<Scalar> for Path
impl FromIterator<Scalar> for Path
sourceimpl PartialOrd<Scalar> for Scalar
impl PartialOrd<Scalar> for Scalar
sourcefn partial_cmp(&self, other: &Scalar) -> Option<Ordering>
fn partial_cmp(&self, other: &Scalar) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresourceimpl Serialize for Scalar
impl Serialize for Scalar
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Scalar
Auto Trait Implementations
impl RefUnwindSafe for Scalar
impl Send for Scalar
impl Sync for Scalar
impl Unpin for Scalar
impl UnwindSafe for Scalar
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more