Struct std::rc::RcStable
[-]
[+]
[src]
pub struct Rc<T> {
// some fields omitted
}An immutable reference-counted pointer type.
Methods
impl<T> Rc<T>
fn new(value: T) -> Rc<T>
Constructs a new reference-counted pointer.
fn downgrade(&self) -> Weak<T>
Downgrades the reference-counted pointer to a weak reference.
impl<T: Clone> Rc<T>
fn make_unique(&mut self) -> &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>
fn hash(&self, state: &mut S)
impl<T> Deref<T> for Rc<T>
fn deref(&self) -> &T
Borrows the value contained in the reference-counted pointer.