pub struct List { /* private fields */ }Implementations§
Source§impl List
impl List
pub fn make_empty(capacity: u64, memgraph: &Memgraph) -> MgpResult<List>
pub fn copy(&self) -> MgpResult<List>
Sourcepub fn append(&self, value: &Value) -> MgpResult<()>
pub fn append(&self, value: &Value) -> MgpResult<()>
Appends value to the list, but if there is no place, returns an error.
Sourcepub fn append_extend(&self, value: &Value) -> MgpResult<()>
pub fn append_extend(&self, value: &Value) -> MgpResult<()>
In case of a capacity change, the previously contained elements will move in memory and any references to them will be invalid.
pub fn size(&self) -> u64
pub fn capacity(&self) -> u64
Sourcepub fn value_at(&self, index: u64) -> MgpResult<Value>
pub fn value_at(&self, index: u64) -> MgpResult<Value>
Always copies the underlying value because in case of the capacity change any references would become invalid.
pub fn iter(&self) -> MgpResult<ListIterator<'_>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for List
impl RefUnwindSafe for List
impl !Send for List
impl !Sync for List
impl Unpin for List
impl UnwindSafe for List
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more