pub struct InitializingObject<T: ObjectSubclass>(_);
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
sourceimpl<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> RefUnwindSafe for InitializingObject<T> where
<T as ObjectSubclass>::Type: RefUnwindSafe,
impl<T> Send for InitializingObject<T> where
<T as ObjectSubclass>::Type: Send,
impl<T> Sync for InitializingObject<T> where
<T as ObjectSubclass>::Type: Sync,
impl<T> Unpin for InitializingObject<T> where
<T as ObjectSubclass>::Type: Unpin,
impl<T> UnwindSafe for InitializingObject<T> where
<T as ObjectSubclass>::Type: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more