Struct toolshed::Uninitialized

source ·
pub struct Uninitialized<'arena, T: 'arena> { /* private fields */ }
Expand description

A pointer to an uninitialized region of memory.

Implementations

Initialize the memory at the pointer with a given value.

Get a reference to the pointer without writing to it.

Reading from this reference without calling init is undefined behavior.

Convert the Uninitialized to a regular mutable reference.

Reading from this reference without calling init is undefined behavior.

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

Trait Implementations

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.