Struct horde::sync_push_vec::LockedWrite [−][src]
pub struct LockedWrite<'a, T> { /* fields omitted */ }
A handle to a SyncPushVec with write access protected by a lock.
Methods from Deref<Target = Write<'a, T>>
pub fn push(&mut self, value: T) -> (&'a T, usize)
[src]
Inserts a new element into the end of the table, and returns a refernce to it along with its index.
pub fn reserve(&mut self, additional: usize)
[src]
Reserves capacity for at least additional
more elements to be inserted
in the given vector. The collection may reserve more space to avoid
frequent reallocations. Does nothing if the capacity is already sufficient.
pub fn replace<I: IntoIterator<Item = T>>(&mut self, iter: I, capacity: usize)
[src]
Replaces the content of the vector with the content of the iterator.
capacity
specifies the new capacity if it’s greater than the length of the iterator.
Trait Implementations
impl<'a, T> Deref for LockedWrite<'a, T>
[src]
impl<'a, T> Deref for LockedWrite<'a, T>
[src]Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for LockedWrite<'a, T>
impl<'a, T> !Send for LockedWrite<'a, T>
impl<'a, T> Sync for LockedWrite<'a, T> where
T: Sync,
T: Sync,