pub struct Loan(/* private fields */);Expand description
The implicit self of one call. The managed call holds its physical owner separately;
retaining this weak loan cannot extend the resource’s lifetime.
Implementations§
Source§impl Loan
impl Loan
Sourcepub fn with_backend<T: Capability, R>(
&self,
operation: impl FnOnce(&T) -> R,
) -> Option<R>
pub fn with_backend<T: Capability, R>( &self, operation: impl FnOnce(&T) -> R, ) -> Option<R>
Inspect the issuer’s backend while it is alive; another issuer or an expired loan
yields None. The backend reference cannot escape the operation.
Auto Trait Implementations§
impl !RefUnwindSafe for Loan
impl !Send for Loan
impl !Sync for Loan
impl !UnwindSafe for Loan
impl Forget for Loan
impl Freeze for Loan
impl Move for Loan
impl Unpin for Loan
impl UnsafeUnpin for Loan
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