Trait liquid_core::model::ObjectView
source · pub trait ObjectView: ValueView {
// Required methods
fn as_value(&self) -> &dyn ValueView;
fn size(&self) -> i64;
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>;
}
Expand description
Accessor for objects.
Required Methods§
sourcefn keys<'k>(&'k self) -> Box<dyn Iterator<Item = KStringCow<'k>> + 'k>
fn keys<'k>(&'k self) -> Box<dyn Iterator<Item = KStringCow<'k>> + 'k>
Keys available for lookup.
sourcefn values<'k>(&'k self) -> Box<dyn Iterator<Item = &'k dyn ValueView> + 'k>
fn values<'k>(&'k self) -> Box<dyn Iterator<Item = &'k dyn ValueView> + 'k>
Keys available for lookup.
sourcefn iter<'k>(
&'k self
) -> Box<dyn Iterator<Item = (KStringCow<'k>, &'k dyn ValueView)> + 'k>
fn iter<'k>( &'k self ) -> Box<dyn Iterator<Item = (KStringCow<'k>, &'k dyn ValueView)> + 'k>
Returns an iterator .
sourcefn contains_key(&self, index: &str) -> bool
fn contains_key(&self, index: &str) -> bool
Access a contained BoxedValue
.