Struct boa::object::PropertyMap
source · [−]pub struct PropertyMap { /* private fields */ }
Implementations
sourceimpl PropertyMap
impl PropertyMap
pub fn new() -> Self
pub fn get(&self, key: &PropertyKey) -> Option<&PropertyDescriptor>
pub fn insert(
&mut self,
key: PropertyKey,
property: PropertyDescriptor
) -> Option<PropertyDescriptor>
pub fn remove(&mut self, key: &PropertyKey) -> Option<PropertyDescriptor>
sourcepub fn iter(&self) -> Iter<'_>ⓘNotable traits for Iter<'a>impl<'a> Iterator for Iter<'a> type Item = (PropertyKey, &'a PropertyDescriptor);
pub fn iter(&self) -> Iter<'_>ⓘNotable traits for Iter<'a>impl<'a> Iterator for Iter<'a> type Item = (PropertyKey, &'a PropertyDescriptor);
An iterator visiting all key-value pairs in arbitrary order. The iterator element type is (PropertyKey, &'a Property)
.
This iterator does not recurse down the prototype chain.
sourcepub fn keys(&self) -> Keys<'_>ⓘNotable traits for Keys<'a>impl<'a> Iterator for Keys<'a> type Item = PropertyKey;
pub fn keys(&self) -> Keys<'_>ⓘNotable traits for Keys<'a>impl<'a> Iterator for Keys<'a> type Item = PropertyKey;
An iterator visiting all keys in arbitrary order. The iterator element type is PropertyKey
.
This iterator does not recurse down the prototype chain.
sourcepub fn values(&self) -> Values<'_>ⓘNotable traits for Values<'a>impl<'a> Iterator for Values<'a> type Item = &'a PropertyDescriptor;
pub fn values(&self) -> Values<'_>ⓘNotable traits for Values<'a>impl<'a> Iterator for Values<'a> type Item = &'a PropertyDescriptor;
An iterator visiting all values in arbitrary order. The iterator element type is &'a Property
.
This iterator does not recurse down the prototype chain.
sourcepub fn symbol_properties(&self) -> SymbolProperties<'_>ⓘNotable traits for SymbolProperties<'a>impl<'a> Iterator for SymbolProperties<'a> type Item = (&'a JsSymbol, &'a PropertyDescriptor);
pub fn symbol_properties(&self) -> SymbolProperties<'_>ⓘNotable traits for SymbolProperties<'a>impl<'a> Iterator for SymbolProperties<'a> type Item = (&'a JsSymbol, &'a PropertyDescriptor);
An iterator visiting all symbol key-value pairs in arbitrary order. The iterator element type is (&'a RcSymbol, &'a Property)
.
This iterator does not recurse down the prototype chain.
sourcepub fn symbol_property_keys(&self) -> SymbolPropertyKeys<'_>ⓘNotable traits for SymbolPropertyKeys<'a>impl<'a> Iterator for SymbolPropertyKeys<'a> type Item = &'a JsSymbol;
pub fn symbol_property_keys(&self) -> SymbolPropertyKeys<'_>ⓘNotable traits for SymbolPropertyKeys<'a>impl<'a> Iterator for SymbolPropertyKeys<'a> type Item = &'a JsSymbol;
An iterator visiting all symbol keys in arbitrary order. The iterator element type is &'a RcSymbol
.
This iterator does not recurse down the prototype chain.
sourcepub fn symbol_property_values(&self) -> SymbolPropertyValues<'_>ⓘNotable traits for SymbolPropertyValues<'a>impl<'a> Iterator for SymbolPropertyValues<'a> type Item = &'a PropertyDescriptor;
pub fn symbol_property_values(&self) -> SymbolPropertyValues<'_>ⓘNotable traits for SymbolPropertyValues<'a>impl<'a> Iterator for SymbolPropertyValues<'a> type Item = &'a PropertyDescriptor;
An iterator visiting all symbol values in arbitrary order. The iterator element type is &'a Property
.
This iterator does not recurse down the prototype chain.
sourcepub fn index_properties(&self) -> IndexProperties<'_>ⓘNotable traits for IndexProperties<'a>impl<'a> Iterator for IndexProperties<'a> type Item = (&'a u32, &'a PropertyDescriptor);
pub fn index_properties(&self) -> IndexProperties<'_>ⓘNotable traits for IndexProperties<'a>impl<'a> Iterator for IndexProperties<'a> type Item = (&'a u32, &'a PropertyDescriptor);
An iterator visiting all indexed key-value pairs in arbitrary order. The iterator element type is (&'a u32, &'a Property)
.
This iterator does not recurse down the prototype chain.
sourcepub fn index_property_keys(&self) -> IndexPropertyKeys<'_>ⓘNotable traits for IndexPropertyKeys<'a>impl<'a> Iterator for IndexPropertyKeys<'a> type Item = &'a u32;
pub fn index_property_keys(&self) -> IndexPropertyKeys<'_>ⓘNotable traits for IndexPropertyKeys<'a>impl<'a> Iterator for IndexPropertyKeys<'a> type Item = &'a u32;
An iterator visiting all index keys in arbitrary order. The iterator element type is &'a u32
.
This iterator does not recurse down the prototype chain.
sourcepub fn index_property_values(&self) -> IndexPropertyValues<'_>ⓘNotable traits for IndexPropertyValues<'a>impl<'a> Iterator for IndexPropertyValues<'a> type Item = &'a PropertyDescriptor;
pub fn index_property_values(&self) -> IndexPropertyValues<'_>ⓘNotable traits for IndexPropertyValues<'a>impl<'a> Iterator for IndexPropertyValues<'a> type Item = &'a PropertyDescriptor;
An iterator visiting all index values in arbitrary order. The iterator element type is &'a Property
.
This iterator does not recurse down the prototype chain.
sourcepub fn string_properties(&self) -> StringProperties<'_>ⓘNotable traits for StringProperties<'a>impl<'a> Iterator for StringProperties<'a> type Item = (&'a JsString, &'a PropertyDescriptor);
pub fn string_properties(&self) -> StringProperties<'_>ⓘNotable traits for StringProperties<'a>impl<'a> Iterator for StringProperties<'a> type Item = (&'a JsString, &'a PropertyDescriptor);
An iterator visiting all string key-value pairs in arbitrary order. The iterator element type is (&'a RcString, &'a Property)
.
This iterator does not recurse down the prototype chain.
sourcepub fn string_property_keys(&self) -> StringPropertyKeys<'_>ⓘNotable traits for StringPropertyKeys<'a>impl<'a> Iterator for StringPropertyKeys<'a> type Item = &'a JsString;
pub fn string_property_keys(&self) -> StringPropertyKeys<'_>ⓘNotable traits for StringPropertyKeys<'a>impl<'a> Iterator for StringPropertyKeys<'a> type Item = &'a JsString;
An iterator visiting all string keys in arbitrary order. The iterator element type is &'a RcString
.
This iterator does not recurse down the prototype chain.
sourcepub fn string_property_values(&self) -> StringPropertyValues<'_>ⓘNotable traits for StringPropertyValues<'a>impl<'a> Iterator for StringPropertyValues<'a> type Item = &'a PropertyDescriptor;
pub fn string_property_values(&self) -> StringPropertyValues<'_>ⓘNotable traits for StringPropertyValues<'a>impl<'a> Iterator for StringPropertyValues<'a> type Item = &'a PropertyDescriptor;
An iterator visiting all string values in arbitrary order. The iterator element type is &'a Property
.
This iterator does not recurse down the prototype chain.