Struct std::rc::Rc[src]
pub struct Rc<T> {
// some fields omitted
}Immutable reference counted pointer type
Methods
impl<T> Rc<T>
impl<T> Rc<T>
impl<T: Clone> Rc<T>
fn make_unique<T: Clone>(&'a mut self) -> &'a mut T
Acquires a mutable pointer to the inner contents by guaranteeing that the reference count is one (no sharing is possible).
This is also referred to as a copy-on-write operation because the inner data is cloned if the reference count is greater than one.
Trait Implementations
impl<S: Writer, T: Hash<S>> Hash<S> for Rc<T>
impl<T> Deref<T> for Rc<T>
fn deref<T>(&'a self) -> &'a T
Borrow the value contained in the reference-counted box