[][src]Trait liquid_value::object::ObjectView

pub trait ObjectView: ValueView {
    fn as_value(&self) -> &dyn ValueView;
fn size(&self) -> i32;
fn keys<'k>(&'k self) -> Box<dyn Iterator<Item = KStringCow<'k>> + 'k>;
fn values<'k>(&'k self) -> Box<dyn Iterator<Item = &'k dyn ValueView> + 'k>;
fn iter<'k>(
        &'k self
    ) -> Box<dyn Iterator<Item = (KStringCow<'k>, &'k dyn ValueView)> + 'k>;
fn contains_key(&self, index: &str) -> bool;
fn get<'s>(&'s self, index: &str) -> Option<&'s dyn ValueView>; }

Accessor for objects.

Required methods

fn as_value(&self) -> &dyn ValueView

Cast to ValueView

fn size(&self) -> i32

Returns the number of elements.

fn keys<'k>(&'k self) -> Box<dyn Iterator<Item = KStringCow<'k>> + 'k>

Keys available for lookup.

fn values<'k>(&'k self) -> Box<dyn Iterator<Item = &'k dyn ValueView> + 'k>

Keys available for lookup.

fn iter<'k>(
    &'k self
) -> Box<dyn Iterator<Item = (KStringCow<'k>, &'k dyn ValueView)> + 'k>

Returns an iterator .

fn contains_key(&self, index: &str) -> bool

Access a contained BoxedValue.

fn get<'s>(&'s self, index: &str) -> Option<&'s dyn ValueView>

Access a contained Value.

Loading content...

Implementations on Foreign Types

impl<K: ObjectIndex, V: ValueView, S: BuildHasher> ObjectView for HashMap<K, V, S>[src]

impl<K: ObjectIndex, V: ValueView> ObjectView for BTreeMap<K, V>[src]

Loading content...

Implementors

impl ObjectView for Object[src]

Loading content...