[−][src]Struct toolshed::Uninitialized
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]
fn from(pointer: &'arena mut T) -> Self
[src]
Auto Trait Implementations
impl<'arena, T> Send for Uninitialized<'arena, T> where
T: Send,
T: Send,
impl<'arena, T> Sync for Uninitialized<'arena, T> where
T: Sync,
T: Sync,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,