Struct lrs::rc::Arc

An atomically reference-counted container.

Syntax

struct Arc<T, Heap = Libc>
    where T: Leak,
          Heap: Allocator,
{
    /* private fields */
}

Static methods

NameDescription
new

Creates a new Arc.

Methods

ReceiverNameDescription
&selfadd_ref

Adds a new reference, returning an Arc that points to the same data.

&mut selfas_mut

Returns a mutable reference to the contained data if this is the only reference.

Trait implementations

NameDescription
Clone

Objects that can be duplicated.

Debug

Objects that can be formatted in a "debug" form.

Deref

Objects that implement the immutable dereference operator.

Drop

Objects with a destructor.

MaybeClone

Objects that can be duplicated.

Send

Objects whose ownership can be moved from one thread to another.

Sync

Objects that allow immutable access from threads other than their owning thread.

UndefState

Types that are not valid when they contain certain bit patterns.