pub unsafe trait Loanable<'t>: Deref { }Expand description
The trait for types that can be used with Loaned::loan and
LoanedMut::loan.
§Safety
This type must ensure that the reference returned by Deref (and
DerefMut, if implemented) is valid for 't, as long as self is not
used for the remainder of 't (though it may be moved).
In particular, this can’t be implemented for types like Cow, as it may
return a reference to data within self (which would be invalidated when
self is moved).
This is closely related to whether the type can unconditionally implement
Unpin (i.e. even when Self::Target: !Unpin).