Struct pin_init::UniqueArc[][src]

#[repr(transparent)]
pub struct UniqueArc<T: ?Sized>(_);
This is supported on crate feature alloc only.
Expand description

An uniquely owned Arc.

Useful for constructing Arc, since we are certain that when Arc is initially created, there is an unique reference. Once initially mutation is done, it can be convert to Arc with shareable().

Implementations

This is supported on crate feature alloc_pin_with only.

Constructs a new UniqueArc.

This is supported on crate feature alloc_try_pin_with only.

Try to constructs a new UniqueArc.

Convert to a shareable Arc<T>.

Convert to a shareable Pin<Arc<T>>.

Constructs a new UniqueArc with uninitialized contents.

Convert to an initialized Arc.

Safety

This function is unsafe as this is equivalent to MaybeUninit::assume_init.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Performs the conversion.

Pin-initialize a UniqueArc.

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.

Pin-initialize this.

Maps the error from E to E2.

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.