Struct pinned_aliasable::Aliasable[][src]

pub struct Aliasable<T> { /* fields omitted */ }
Expand description

An unboxed aliasable value.

Implementations

Create a new Aliasable that stores val.

Get a shared reference to the value inside the Aliasable.

This method takes Pin<&Self> instead of &self to enforce that all parent containers are !Unpin, and thus won’t be annotated with noalias.

This crate intentionally does not provide a method to get an &mut T, because the value may be shared. To obtain an &mut T you should use an interior mutable container such as a mutex or UnsafeCell.

Get a shared reference to the value inside the Aliasable with an extended lifetime.

Safety

The reference must not be held for longer than the Aliasable exists.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. 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

Performs the conversion.

Performs the conversion.

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.