Struct pwasm_utils::RefList [−][src]
pub struct RefList<T> { /* fields omitted */ }
Expand description
List that tracks references and indices.
Implementations
Push new element in the list.
Returns refernce tracking entry.
Start deleting.
Start deleting some entries in the list. Returns transaction that can be populated with number of removed entries. When transaction is finailized, all entries are deleted and internal indices of other entries are updated.
Start inserting.
Start inserting some entries in the list at he designated position. Returns transaction that can be populated with some entries. When transaction is finailized, all entries are inserted and internal indices of other entries might be updated.
pub fn begin_insert_after<F>(&mut self, f: F) -> InsertTransaction<'_, T> where
F: FnMut(&T) -> bool,
pub fn begin_insert_after<F>(&mut self, f: F) -> InsertTransaction<'_, T> where
F: FnMut(&T) -> bool,
Start inserting after the condition first matches (or at the end).
Start inserting some entries in the list at he designated position. Returns transaction that can be populated with some entries. When transaction is finailized, all entries are inserted and internal indices of other entries might be updated.
pub fn begin_insert_not_until<F>(&mut self, f: F) -> InsertTransaction<'_, T> where
F: FnMut(&T) -> bool,
pub fn begin_insert_not_until<F>(&mut self, f: F) -> InsertTransaction<'_, T> where
F: FnMut(&T) -> bool,
Start inserting after the condition first no longer true (or at the end).
Start inserting some entries in the list at he designated position. Returns transaction that can be populated with some entries. When transaction is finailized, all entries are inserted and internal indices of other entries might be updated.
Get entry with index (checked).
Can return None when index out of bounts.
Delete one item.
Initialize from slice.
Slice members are cloned.
Clone entry (reference counting object to item) by index.
Will panic if index out of bounds.
Get reference to entry by index.
Will panic if index out of bounds.