Struct fuchsia_bluetooth::detachable_map::DetachableWeak
source · pub struct DetachableWeak<K, V> { /* private fields */ }
Expand description
A weak reference to an entry in a DetachableMap. This is a weak reference, if the entry is detached before it is upgraded, the entry can be gone.
Implementations§
source§impl<K: Hash + Eq, V> DetachableWeak<K, V>
impl<K: Hash + Eq, V> DetachableWeak<K, V>
sourcepub fn upgrade(&self) -> Option<Arc<V>>
pub fn upgrade(&self) -> Option<Arc<V>>
Attempt to upgrade the weak pointer to an Arc, extending the lifetime of the value if successful. Returns None if the item has been dropped (by another client detaching this)
Trait Implementations§
Auto Trait Implementations§
impl<K, V> !RefUnwindSafe for DetachableWeak<K, V>
impl<K, V> Send for DetachableWeak<K, V>where K: Send + Sync, V: Send + Sync,
impl<K, V> Sync for DetachableWeak<K, V>where K: Send + Sync, V: Send + Sync,
impl<K, V> Unpin for DetachableWeak<K, V>where K: Unpin,
impl<K, V> !UnwindSafe for DetachableWeak<K, V>
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