pub enum WeakResourceHost {
Element(WeakRef<StyledElement>),
Other(Weak<dyn IResourceHost>),
}Expand description
A weak reference to a resource host.
Variants§
Element(WeakRef<StyledElement>)
Other(Weak<dyn IResourceHost>)
Implementations§
Source§impl WeakResourceHost
impl WeakResourceHost
Sourcepub fn upgrade(&self) -> Option<ResourceHostRef>
pub fn upgrade(&self) -> Option<ResourceHostRef>
Returns a strong reference if the host is still alive.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WeakResourceHost
impl !Send for WeakResourceHost
impl !Sync for WeakResourceHost
impl !UnwindSafe for WeakResourceHost
impl Freeze for WeakResourceHost
impl Unpin for WeakResourceHost
impl UnsafeUnpin for WeakResourceHost
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more