[−][src]Struct memur::UninitArray
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]
T: Sized,
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,
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,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,