pub struct BoundConstructOnlyObject<T: ObjectType> {
obj: OnceCell<T>,
signal_handler_ids: RefCell<Vec<SignalHandlerId>>,
}Expand description
Wrapper to manage a bound construct-only object.
This keeps a strong reference to the object.
Fields§
§obj: OnceCell<T>§signal_handler_ids: RefCell<Vec<SignalHandlerId>>Implementations§
Source§impl<T: ObjectType> BoundConstructOnlyObject<T>
impl<T: ObjectType> BoundConstructOnlyObject<T>
Sourcepub(crate) fn set(&self, obj: T, signal_handler_ids: Vec<SignalHandlerId>)
pub(crate) fn set(&self, obj: T, signal_handler_ids: Vec<SignalHandlerId>)
Set the given object and signal handlers IDs.
Panics if the object was already set.
Trait Implementations§
Source§impl<T: Debug + ObjectType> Debug for BoundConstructOnlyObject<T>
impl<T: Debug + ObjectType> Debug for BoundConstructOnlyObject<T>
Source§impl<T: ObjectType> Default for BoundConstructOnlyObject<T>
impl<T: ObjectType> Default for BoundConstructOnlyObject<T>
Source§impl<T: ObjectType> Drop for BoundConstructOnlyObject<T>
impl<T: ObjectType> Drop for BoundConstructOnlyObject<T>
Source§impl<T: IsA<Object> + HasParamSpec> Property for BoundConstructOnlyObject<T>
impl<T: IsA<Object> + HasParamSpec> Property for BoundConstructOnlyObject<T>
Auto Trait Implementations§
impl<T> !Freeze for BoundConstructOnlyObject<T>
impl<T> !RefUnwindSafe for BoundConstructOnlyObject<T>
impl<T> !Sync for BoundConstructOnlyObject<T>
impl<T> Send for BoundConstructOnlyObject<T>
impl<T> Unpin for BoundConstructOnlyObject<T>
impl<T> UnsafeUnpin for BoundConstructOnlyObject<T>where
OnceCell<T>: UnsafeUnpin,
impl<T> UnwindSafe for BoundConstructOnlyObject<T>where
OnceCell<T>: UnwindSafe,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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 moreimpl<T> JsonCastable<CanonicalJsonValue> for T
impl<T> JsonCastable<Value> for T
Source§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
Source§type NoneType = T
type NoneType = T
The type of the none-equivalent value that
NoneValue::null_value produces.Source§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.