pub struct StrongRef<'scope, T: ?Sized> { /* private fields */ }Expand description
A strong reference obtained from a Scope.
A StrongRef<'_, T> can be dereferenced to a &T.
A StrongRef to a Scope can only be created while Scope::assign()
is being executed, and Scope::assign() will not return until all
existing StrongRef instances have been dropped.
Note, that the lifetime parameter 'scope of a StrongRef<'scope, T> is
that of the associated Scope<T>, not the &T that the Scope<T> is
assigned.
Implementations§
Trait Implementations§
impl<T: Sync + ?Sized> Sync for StrongRef<'_, T>
Auto Trait Implementations§
impl<'scope, T> Freeze for StrongRef<'scope, T>where
T: ?Sized,
impl<'scope, T> RefUnwindSafe for StrongRef<'scope, T>where
T: RefUnwindSafe + ?Sized,
impl<'scope, T> !Send for StrongRef<'scope, T>
impl<'scope, T> Unpin for StrongRef<'scope, T>where
T: ?Sized,
impl<'scope, T> UnsafeUnpin for StrongRef<'scope, T>where
T: ?Sized,
impl<'scope, T> UnwindSafe for StrongRef<'scope, T>where
T: RefUnwindSafe + ?Sized,
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