pub struct Share<T: Debug>(/* private fields */);
Expand description
Either strong or weak reference-counting pointer.
Implementations§
Sourcepub fn transfer(&mut self) -> Option<Rc<T>>
pub fn transfer(&mut self) -> Option<Rc<T>>
Give out the owned strong reference and become a weak reference itself.
For a weak reference, do nothing and return None
.
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more