[−][src]Trait liquid::model::ValueView
Accessor for Values.
Required methods
fn as_debug(&self) -> &dyn Debug
Get a Debug
representation
fn render(&self) -> DisplayCow
A Display
for a BoxedValue
rendered for the user.
fn source(&self) -> DisplayCow
A Display
for a Value
as source code.
fn type_name(&self) -> &'static str
Report the data type (generally for error reporting).
fn query_state(&self, state: State) -> bool
Query the value's state
fn to_kstr(&self) -> KStringCow
Interpret as a string.
fn to_value(&self) -> Value
Convert to an owned type.
Provided methods
fn as_scalar(&self) -> Option<ScalarCow>
Extracts the scalar value if it is a scalar.
fn is_scalar(&self) -> bool
Tests whether this value is a scalar
fn as_array(&self) -> Option<&dyn ArrayView>
Extracts the array value if it is an array.
fn is_array(&self) -> bool
Tests whether this value is an array
fn as_object(&self) -> Option<&dyn ObjectView>
Extracts the object value if it is a object.
fn is_object(&self) -> bool
Tests whether this value is an object
fn as_state(&self) -> Option<State>
Extracts the state if it is one
fn is_state(&self) -> bool
Tests whether this value is state
fn is_nil(&self) -> bool
Tests whether this value is nil
See https://stackoverflow.com/questions/885414/a-concise-explanation-of-nil-v-empty-v-blank-in-ruby-on-rails
Implementations on Foreign Types
impl ValueView for i64
[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]
impl ValueView for String
[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]
impl ValueView for i16
[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]
impl ValueView for i8
[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]
impl ValueView for f32
[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]
impl<K, V> ValueView for BTreeMap<K, V> where
K: ObjectIndex,
V: ValueView,
[src]
K: ObjectIndex,
V: ValueView,
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_object(&self) -> Option<&dyn ObjectView>
[src]
impl ValueView for i32
[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]
impl<'s> ValueView for &'s str
[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]
impl<'s> ValueView for KStringCow<'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]
impl<'s> ValueView for KStringRef<'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]
impl ValueView for KString
[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]
impl ValueView for u8
[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]
impl ValueView for u16
[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]
impl ValueView for bool
[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]
impl ValueView for f64
[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]
impl ValueView for u32
[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]
impl<T> ValueView for Option<T> where
T: ValueView,
[src]
T: ValueView,
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 as_array(&self) -> Option<&dyn ArrayView>
[src]
fn as_object(&self) -> Option<&dyn ObjectView>
[src]
fn as_state(&self) -> Option<State>
[src]
fn is_nil(&self) -> bool
[src]
impl<T> ValueView for Vec<T> where
T: ValueView,
[src]
T: ValueView,
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_array(&self) -> Option<&dyn ArrayView>
[src]
impl<K, V, S> ValueView for HashMap<K, V, S> where
K: ObjectIndex,
S: BuildHasher,
V: ValueView,
[src]
K: ObjectIndex,
S: BuildHasher,
V: ValueView,