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 read(&self) -> Read<'_, T>[src]

Creates a Read handle which gives access to read operations.

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]

type Target = Write<'a, T>

The resulting type after dereferencing.

impl<'a, T> DerefMut 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

impl<'a, T> Unpin for LockedWrite<'a, T>

impl<'a, T> !UnwindSafe for LockedWrite<'a, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.