Trait borrow_with_ref_obj::BorrowMutWithRefObj[][src]

pub trait BorrowMutWithRefObj<'refr, T: 'refr + ?Sized> {
    type ReferenceMut: DerefMut<Target = T> + 'refr;
    fn borrow_mut(&'refr mut self) -> Self::ReferenceMut;
}

Mutable borrower whose reference is an object.

See the crate documentation for more info.

Associated Types

Type of the reference object.

Unlike Borrow and BorrowMut, the type may be (and usually is) different than the immutable version of the reference.

Required Methods

Borrows the object mutably.

Panics

May panic if borrowing a borrowed RefCell, a poisoned Mutex or RwLock, or some other implementation-defined issue.

Implementations on Foreign Types

impl<'refr, 'main, T: 'refr + ?Sized> BorrowMutWithRefObj<'refr, T> for &'main mut T
[src]

impl<'refr, T: 'refr + ?Sized> BorrowMutWithRefObj<'refr, T> for Box<T>
[src]

impl<'refr, T: 'refr + ?Sized> BorrowMutWithRefObj<'refr, T> for Rc<RefCell<T>>
[src]

impl<'refr, T: 'refr + ?Sized> BorrowMutWithRefObj<'refr, T> for Arc<Mutex<T>>
[src]

impl<'refr, T: 'refr + ?Sized> BorrowMutWithRefObj<'refr, T> for Arc<RwLock<T>>
[src]

Implementors