Struct horde::sync_push_vec::Write[][src]

pub struct Write<'a, T> { /* fields omitted */ }

A handle to a SyncPushVec with write access.

Implementations

impl<T> Write<'_, T>[src]

pub fn read(&self) -> Read<'_, T>[src]

Creates a Read handle which gives access to read operations.

impl<'a, T: Send + Clone> Write<'a, T>[src]

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.

impl<T: Send> Write<'_, T>[src]

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<T: Clone + Send> Extend<T> for Write<'_, T>[src]

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for Write<'a, T>

impl<'a, T> Send for Write<'a, T> where
    T: Sync

impl<'a, T> Sync for Write<'a, T> where
    T: Sync

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

impl<'a, T> !UnwindSafe for Write<'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.