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.
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.
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
Pin-initialize a UniqueArc
.
impl<T> PtrTryPinWith<T> for UniqueArc<T>
This is supported on crate feature alloc_try_pin_with
only.
impl<T> PtrTryPinWith<T> for UniqueArc<T>
This is supported on crate feature
alloc_try_pin_with
only.