[][src]Struct toolshed::Uninitialized

pub struct Uninitialized<'arena, T: Copy> { /* fields omitted */ }

A pointer to an uninitialized region of memory.

Methods

impl<'arena, T: Copy> Uninitialized<'arena, T>[src]

pub fn init(self, value: T) -> &'arena mut T[src]

Initialize the memory at the pointer with a given value.

pub unsafe fn as_ref(&self) -> &'arena T[src]

Get a reference to the pointer without writing to it.

Calling this method without calling init is undefined behavior.

pub unsafe fn as_mut_ref(self) -> &'arena mut T[src]

Convert the Uninitialized to a regular mutable reference.

Calling this method without calling init is undefined behavior.

pub unsafe fn from_raw(pointer: *mut T) -> Self[src]

Convert a raw pointer to an Uninitialized. This method is unsafe since it can bind to arbitrary lifetimes.

Trait Implementations

impl<'arena, T: Copy> From<&'arena mut T> for Uninitialized<'arena, T>[src]

Auto Trait Implementations

impl<'arena, T> Send for Uninitialized<'arena, T> where
    T: Send

impl<'arena, T> Sync for Uninitialized<'arena, T> where
    T: Sync

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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