pub struct ScalarCow<'s>(/* private fields */);Expand description
A Liquid scalar value
Implementations§
Source§impl<'s> ScalarCow<'s>
impl<'s> ScalarCow<'s>
Sourcepub fn source(&self) -> ScalarSource<'_>
pub fn source(&self) -> ScalarSource<'_>
A Display for a Scalar as source code.
Sourcepub fn render(&self) -> ScalarRendered<'_>
pub fn render(&self) -> ScalarRendered<'_>
A Display for a Scalar rendered for the user.
Sourcepub fn into_owned(self) -> Self
pub fn into_owned(self) -> Self
Create an owned version of the value.
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 is_default(&self) -> bool
pub fn is_default(&self) -> bool
Whether a default constructed value.
Trait Implementations§
Source§impl<'de, 's> Deserialize<'de> for ScalarCow<'s>
impl<'de, 's> Deserialize<'de> for ScalarCow<'s>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'s> Extend<ScalarCow<'s>> for Path<'s>
impl<'s> Extend<ScalarCow<'s>> for Path<'s>
Source§fn extend<T: IntoIterator<Item = ScalarCow<'s>>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = ScalarCow<'s>>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn 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.
Source§fn 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
Source§impl<'s> PartialOrd<DateTime<FixedOffset>> for ScalarCow<'s>
impl<'s> PartialOrd<DateTime<FixedOffset>> for ScalarCow<'s>
Source§impl<'s> PartialOrd<bool> for ScalarCow<'s>
impl<'s> PartialOrd<bool> for ScalarCow<'s>
Source§impl<'s> PartialOrd<f64> for ScalarCow<'s>
impl<'s> PartialOrd<f64> for ScalarCow<'s>
Source§impl<'s> PartialOrd<i32> for ScalarCow<'s>
impl<'s> PartialOrd<i32> for ScalarCow<'s>
Source§impl<'s> PartialOrd<str> for ScalarCow<'s>
impl<'s> PartialOrd<str> for ScalarCow<'s>
Source§impl<'s> PartialOrd for ScalarCow<'s>
impl<'s> PartialOrd for ScalarCow<'s>
impl<'s> Eq for ScalarCow<'s>
Auto Trait Implementations§
impl<'s> Freeze for ScalarCow<'s>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more