Type Definition liquid_core::model::KString

source ·
pub type KString = KStringBase<Box<str, Global>>;
Expand description

A UTF-8 encoded, immutable string.

Trait Implementations§

source§

impl ObjectIndex for KString

source§

fn as_index(&self) -> &str

Borrow the index
source§

impl ValueView for KString

source§

fn as_debug(&self) -> &dyn Debug

Get a Debug representation
source§

fn render(&self) -> DisplayCow<'_>

A Display for a BoxedValue rendered for the user.
source§

fn source(&self) -> DisplayCow<'_>

A Display for a Value as source code.
source§

fn type_name(&self) -> &'static str

Report the data type (generally for error reporting).
source§

fn query_state(&self, state: State) -> bool

Query the value’s state
source§

fn to_kstr(&self) -> KStringCow<'_>

Interpret as a string.
source§

fn to_value(&self) -> Value

Convert to an owned type.
source§

fn as_scalar(&self) -> Option<ScalarCow<'_>>

Extracts the scalar value if it is a scalar.
source§

fn is_scalar(&self) -> bool

Tests whether this value is a scalar
source§

fn as_array(&self) -> Option<&dyn ArrayView>

Extracts the array value if it is an array.
source§

fn is_array(&self) -> bool

Tests whether this value is an array
source§

fn as_object(&self) -> Option<&dyn ObjectView>

Extracts the object value if it is a object.
source§

fn is_object(&self) -> bool

Tests whether this value is an object
source§

fn as_state(&self) -> Option<State>

Extracts the state if it is one
source§

fn is_state(&self) -> bool

Tests whether this value is state
source§

fn is_nil(&self) -> bool

Tests whether this value is nil Read more