pub type SharedGeometryTable<K, V> = Rc<RefCell<HashGeometryTable<K, V>>>;Expand description
Shared interior-mutable handle to a hash-backed geometry table.
This alias is used throughout the concrete API so multiple primitives can reference the same logical table without taking ownership of it.
Aliased Type§
pub struct SharedGeometryTable<K, V> { /* private fields */ }Trait Implementations§
Source§impl<K, V> IsGeometryTable for SharedGeometryTable<K, V>where
K: IsGeometryKey,
V: GeometricPrimitive,
impl<K, V> IsGeometryTable for SharedGeometryTable<K, V>where
K: IsGeometryKey,
V: GeometricPrimitive,
Source§fn get(&self, key: &Self::Key) -> Option<Self::Item>
fn get(&self, key: &Self::Key) -> Option<Self::Item>
Returns the item stored at
key, if present.Source§fn insert(&mut self, key: Self::Key, value: Self::Item) -> Result<(), ErrorsJSL>
fn insert(&mut self, key: Self::Key, value: Self::Item) -> Result<(), ErrorsJSL>
Inserts or replaces the item stored at
key.Source§fn remove(&mut self, key: &Self::Key) -> Option<Self::Item>
fn remove(&mut self, key: &Self::Key) -> Option<Self::Item>
Removes and returns the item stored at
key, if present.Source§fn contains_key(&self, key: &Self::Key) -> bool
fn contains_key(&self, key: &Self::Key) -> bool
Returns
true if key exists in the table.Source§fn intersection(&self, other: &Self) -> Self
fn intersection(&self, other: &Self) -> Self
Computes the intersection of two tables.
Source§fn iter(&self) -> Box<dyn Iterator<Item = (Self::Key, Self::Item)> + '_>
fn iter(&self) -> Box<dyn Iterator<Item = (Self::Key, Self::Item)> + '_>
Iterates immutably over key/value pairs in the table.