pub struct Registry { /* private fields */ }Expand description
The registry object allows clients to enumerate and interact with objects. For more details, see the Proxy documentation.
Implementations§
Source§impl Registry
impl Registry
Sourcepub fn add_listener(&self, events: RegistryEvents) -> HookId
pub fn add_listener(&self, events: RegistryEvents) -> HookId
Register to be notified of events on the registry.
Sourcepub fn remove_listener(&self, hook_id: HookId)
pub fn remove_listener(&self, hook_id: HookId)
Remove a set of event listeners.
Trait Implementations§
Source§impl Refcounted for Registry
impl Refcounted for Registry
Source§type WeakRef = WeakRegistry
type WeakRef = WeakRegistry
The type of a weak reference to the object
Source§fn upgrade(this: &Self::WeakRef) -> Option<Self>
fn upgrade(this: &Self::WeakRef) -> Option<Self>
Try to convert a weak reference to a strong reference. If the underlying object isstill
alive, returns a
Some continaing the value. If the underlying object’s strong reference
count dropped to zero, and was thus freed, this returns None.Source§fn downgrade(&self) -> Self::WeakRef
fn downgrade(&self) -> Self::WeakRef
Create a weak reference to the object. This reference does not impact the object’s
lifecycle, and merely allows us the option to try to retrieve the object using
Self::upgrade().
impl Send for Registry
impl Sync for Registry
Auto Trait Implementations§
impl Freeze for Registry
impl !RefUnwindSafe for Registry
impl Unpin for Registry
impl !UnwindSafe for Registry
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