An atomically reference-counted container.
struct Arc<T, Heap = Libc>
where T: Leak,
Heap: Allocator,
{
/* private fields */
}| Name | Description |
|---|---|
| new | Creates a new Arc. |
| Receiver | Name | Description |
|---|---|---|
&self | add_ref | Adds a new reference, returning an |
&mut self | as_mut | Returns a mutable reference to the contained data if this is the only reference. |
| Name | Description |
|---|---|
| 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. |