#[repr(transparent)]
pub struct Allocated<T: ?Sized>(_);
Expand description

A marker type that can be used within Id to indicate that the object has been allocated but not initialized.

The reason we use Option<Id<Allocated<T>, O>> instead of just *mut T is:

  • To allow releasing allocated objects, e.g. in the face of panics.
  • To safely know the object is valid (albeit uninitialized).
  • To allow specifying ownership.

Trait Implementations

Formats the value using the given formatter. Read more

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.