[−][src]Struct liquid::model::ScalarCow
A Liquid scalar value
Implementations
impl<'s> ScalarCow<'s>
[src]
pub fn new<T>(value: T) -> ScalarCow<'s> where
T: Into<ScalarCow<'s>>,
[src]
T: Into<ScalarCow<'s>>,
Convert a value into a ScalarCow
.
pub fn into_owned(self) -> ScalarCow<'static>
[src]
Create an owned version of the value.
pub fn as_ref<'r>(&'r self) -> ScalarCow<'r> where
'r: 's,
[src]
'r: 's,
Create a reference to the value.
pub fn as_view<'r>(&'r self) -> &'s (dyn ValueView + 's) where
'r: 's,
[src]
'r: 's,
Create a reference to the value.
pub fn into_string(self) -> KString
[src]
Convert to a string.
pub fn to_integer(&self) -> Option<i64>
[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
pub fn into_cow_str(self) -> Cow<'s, str>
[src]
Interpret as a Cow str, borrowing 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]
fn deserialize<__D>(
__deserializer: __D
) -> Result<ScalarCow<'s>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<ScalarCow<'s>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<'s> Eq for ScalarCow<'s>
[src]
impl<'s> Extend<ScalarCow<'s>> for Path<'s>
[src]
fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = ScalarCow<'s>>,
[src]
T: IntoIterator<Item = ScalarCow<'s>>,
fn extend_one(&mut self, item: A)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]
impl<'s> From<&'s KString> for ScalarCow<'s>
[src]
impl<'s> From<&'s KStringCow<'s>> for ScalarCow<'s>
[src]
fn from(s: &'s KStringCow<'s>) -> ScalarCow<'s>
[src]
impl<'s> From<&'s KStringRef<'s>> for ScalarCow<'s>
[src]
fn from(s: &'s KStringRef<'s>) -> 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]
fn from(s: KStringCow<'s>) -> ScalarCow<'s>
[src]
impl<'s> From<KStringRef<'s>> for ScalarCow<'s>
[src]
fn from(s: KStringRef<'s>) -> 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<f32> for ScalarCow<'s>
[src]
impl<'s> From<f64> for ScalarCow<'s>
[src]
impl<'s> From<i16> for ScalarCow<'s>
[src]
impl<'s> From<i32> for ScalarCow<'s>
[src]
impl<'s> From<i64> for ScalarCow<'s>
[src]
impl<'s> From<i8> for ScalarCow<'s>
[src]
impl<'s> From<u16> for ScalarCow<'s>
[src]
impl<'s> From<u32> for ScalarCow<'s>
[src]
impl<'s> From<u8> 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]
fn eq(&self, other: &KStringCow<'s>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<KStringRef<'s>> for ScalarCow<'s>
[src]
fn eq(&self, other: &KStringRef<'s>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<ScalarCow<'s>> for ScalarCow<'s>
[src]
fn eq(&self, other: &ScalarCow<'s>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<String> for ScalarCow<'s>
[src]
impl<'s> PartialEq<bool> for ScalarCow<'s>
[src]
impl<'s> PartialEq<f32> for ScalarCow<'s>
[src]
impl<'s> PartialEq<f64> for ScalarCow<'s>
[src]
impl<'s> PartialEq<i16> for ScalarCow<'s>
[src]
impl<'s> PartialEq<i32> for ScalarCow<'s>
[src]
impl<'s> PartialEq<i64> for ScalarCow<'s>
[src]
impl<'s> PartialEq<i8> for ScalarCow<'s>
[src]
impl<'s> PartialEq<str> for ScalarCow<'s>
[src]
impl<'s> PartialEq<u16> for ScalarCow<'s>
[src]
impl<'s> PartialEq<u32> for ScalarCow<'s>
[src]
impl<'s> PartialEq<u8> for ScalarCow<'s>
[src]
impl<'s> PartialOrd<Date> 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<DateTime> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &DateTime) -> 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<KString> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &KString) -> 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<KStringCow<'s>> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &KStringCow<'s>) -> 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<KStringRef<'s>> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &KStringRef<'s>) -> 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<ScalarCow<'s>> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &ScalarCow<'s>) -> 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<String> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &String) -> 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<f32> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &f32) -> 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<i16> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &i16) -> 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<i64> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &i64) -> 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<i8> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &i8) -> 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> PartialOrd<u16> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &u16) -> 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<u32> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &u32) -> 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<u8> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &u8) -> 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> Serialize for ScalarCow<'s>
[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl<'s> ValueView for ScalarCow<'s>
[src]
fn as_debug(&self) -> &dyn Debug
[src]
fn render(&self) -> DisplayCow
[src]
fn source(&self) -> DisplayCow
[src]
fn type_name(&self) -> &'static str
[src]
fn query_state(&self, state: State) -> bool
[src]
fn to_kstr(&self) -> KStringCow
[src]
fn to_value(&self) -> Value
[src]
fn as_scalar(&self) -> Option<ScalarCow>
[src]
fn is_scalar(&self) -> bool
[src]
fn as_array(&self) -> Option<&dyn ArrayView>
[src]
fn is_array(&self) -> bool
[src]
fn as_object(&self) -> Option<&dyn ObjectView>
[src]
fn is_object(&self) -> bool
[src]
fn as_state(&self) -> Option<State>
[src]
fn is_state(&self) -> bool
[src]
fn is_nil(&self) -> bool
[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]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
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> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,