pub struct InitializingObject<T: ObjectSubclass>(/* private fields */);
Expand description
An object that is currently being initialized.
Binding crates should use traits for adding methods to this struct. Only methods explicitly safe
to call during instance_init()
should be added.
Implementations§
source§impl<T: ObjectSubclass> InitializingObject<T>
impl<T: ObjectSubclass> InitializingObject<T>
sourcepub unsafe fn as_ref(&self) -> &T::Type
pub unsafe fn as_ref(&self) -> &T::Type
Returns a reference to the object.
§Safety
The returned object has not been completely initialized at this point. Use of the object
should be restricted to methods that are explicitly documented to be safe to call during
instance_init()
.
Auto Trait Implementations§
impl<T> Freeze for InitializingObject<T>
impl<T> RefUnwindSafe for InitializingObject<T>
impl<T> Send for InitializingObject<T>
impl<T> Sync for InitializingObject<T>
impl<T> Unpin for InitializingObject<T>
impl<T> UnwindSafe for InitializingObject<T>
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