pub struct Factory { /* private fields */ }Expand description
Proxy that represents a factory that is loaded on the server.
Implementations§
Source§impl Factory
impl Factory
Sourcepub fn add_listener(&self, events: FactoryEvents) -> HookId
pub fn add_listener(&self, events: FactoryEvents) -> HookId
Register for notifications of factory events.
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 Factory
impl Refcounted for Factory
Source§type WeakRef = WeakFactory
type WeakRef = WeakFactory
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 Factory
impl Sync for Factory
Auto Trait Implementations§
impl Freeze for Factory
impl RefUnwindSafe for Factory
impl Unpin for Factory
impl UnwindSafe for Factory
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