A single-threaded reference-counted container.
struct Rc<T, Heap = Libc>
where Heap: Allocator,
T: Leak,
{
/* private fields */
}| Name | Description |
|---|---|
| new | Creates a new Rc. |
| 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. |
| Send | Objects whose ownership can be moved from one thread to another. |
| UndefState | Types that are not valid when they contain certain bit patterns. |