pub struct BoundObjectWeakRef<T: ObjectType> {
weak_obj: WeakRef<T>,
signal_handler_ids: RefCell<Vec<SignalHandlerId>>,
}
Expand description
Wrapper to manage a bound object.
This keeps a weak reference to the object.
Fields§
§weak_obj: WeakRef<T>
§signal_handler_ids: RefCell<Vec<SignalHandlerId>>
Implementations§
Source§impl<T: ObjectType> BoundObjectWeakRef<T>
impl<T: ObjectType> BoundObjectWeakRef<T>
Sourcepub fn set(&self, obj: &T, signal_handler_ids: Vec<SignalHandlerId>)
pub fn set(&self, obj: &T, signal_handler_ids: Vec<SignalHandlerId>)
Set the given object and signal handlers IDs.
Calls disconnect_signals
first to remove the previous weak reference
and disconnect the previous signal handlers.
Sourcepub fn disconnect_signals(&self)
pub fn disconnect_signals(&self)
Disconnect the signal handlers and drop the weak reference.
Trait Implementations§
Source§impl<T: Debug + ObjectType> Debug for BoundObjectWeakRef<T>
impl<T: Debug + ObjectType> Debug for BoundObjectWeakRef<T>
Source§impl<T: ObjectType> Default for BoundObjectWeakRef<T>
impl<T: ObjectType> Default for BoundObjectWeakRef<T>
Source§impl<T: ObjectType> Drop for BoundObjectWeakRef<T>
impl<T: ObjectType> Drop for BoundObjectWeakRef<T>
Source§impl<T: IsA<Object> + HasParamSpec> Property for BoundObjectWeakRef<T>
impl<T: IsA<Object> + HasParamSpec> Property for BoundObjectWeakRef<T>
Auto Trait Implementations§
impl<T> !Freeze for BoundObjectWeakRef<T>
impl<T> !RefUnwindSafe for BoundObjectWeakRef<T>
impl<T> Send for BoundObjectWeakRef<T>
impl<T> !Sync for BoundObjectWeakRef<T>
impl<T> Unpin for BoundObjectWeakRef<T>
impl<T> UnwindSafe for BoundObjectWeakRef<T>where
T: RefUnwindSafe,
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
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 more