Struct InitializingObject
pub struct InitializingObject<T>(/* private fields */)
where
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§
§impl<T> InitializingObject<T>where
T: ObjectSubclass,
impl<T> InitializingObject<T>where
T: ObjectSubclass,
pub unsafe fn as_ref(&self) -> &<T as ObjectSubclass>::Type
pub unsafe fn as_ref(&self) -> &<T as ObjectSubclass>::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().
pub fn as_ptr(&self) -> *mut <T as ObjectSubclass>::Type
pub fn as_ptr(&self) -> *mut <T as ObjectSubclass>::Type
Returns a pointer 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().
Trait Implementations§
§impl<T> CompositeTemplateInitializingExt for InitializingObject<T>where
T: WidgetImpl + CompositeTemplate,
impl<T> CompositeTemplateInitializingExt for InitializingObject<T>where
T: WidgetImpl + CompositeTemplate,
fn init_template(&self)
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more