Trait rental::RentalMut [] [src]

pub unsafe trait RentalMut: Rental {
    unsafe fn rental_mut(&mut self) -> &mut Self::Rental;
}

This trait is implemented for all mutable rental structs.

Required Methods

This returns to you the rented value outside of an existential closure. This is unsafe because the lifetime substituted for 'rental here is a lie and does not reflect the true lifetime of the value. Only use this if you have no alternative, and think very carefully about how you're using the value to prevent it from outliving the rental struct, or inserting into it data that will not live long enough.

Implementors