[][src]Struct memur::UninitArray

pub struct UninitArray<T> where
    T: Sized
{ /* fields omitted */ }

Continuous memory block containing uninitialized elements of the same type, and can be used to initialize the Array.

Implementations

impl<T> UninitArray<T> where
    T: Sized
[src]

pub fn len(&self) -> usize[src]

Returns the number of initialized items in array if the Arena is alive.

pub fn capacity(&self) -> usize[src]

Returns the capacity, or maximum allowed items in array if the Arena is alive.

pub unsafe fn data_mut(&mut self) -> *mut T[src]

A pointer to array contents to unsafely initialize the items to appropriate values. Call initialized_to_len to finalize initialization. Alternatively, use start_initializer for safe initialization.

pub unsafe fn initialized_to_len(self, len: usize) -> Array<T>[src]

This function assumes the len items in UninitArray are properly initialized and returns Array that points to the same memory. Any uninitialized items are not re-claimed.

pub fn start_initializer(self) -> ArrayInitializer<T>[src]

Returns the helper to safely initialize the array.

Auto Trait Implementations

impl<T> RefUnwindSafe for UninitArray<T> where
    T: RefUnwindSafe

impl<T> !Send for UninitArray<T>

impl<T> !Sync for UninitArray<T>

impl<T> Unpin for UninitArray<T>

impl<T> UnwindSafe for UninitArray<T> where
    T: RefUnwindSafe

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.