Struct gio::AsyncInitable
source · pub struct AsyncInitable { /* private fields */ }
Expand description
This is the asynchronous version of Initable
; it behaves the same
in all ways except that initialization is asynchronous. For more details
see the descriptions on Initable
.
A class may implement both the Initable
and AsyncInitable
interfaces.
Users of objects implementing this are not intended to use the interface
method directly; instead it will be used automatically in various ways.
For C applications you generally just call [new_async()
][Self::new_async()]
directly, or indirectly via a foo_thing_new_async()
wrapper. This will call
AsyncInitableExt::init_async()
under the cover, calling back with None
and
a set GError
on failure.
A typical implementation might look something like this:
⚠️ The following code is in C ⚠️
enum {
NOT_INITIALIZED,
INITIALIZING,
INITIALIZED
};
static void
_foo_ready_cb (Foo *self)
{
GList *l;
self->priv->state = INITIALIZED;
for (l = self->priv->init_results; l != NULL; l = l->next)
{
GTask *task = l->data;
if (self->priv->success)
g_task_return_boolean (task, TRUE);
else
g_task_return_new_error (task, ...);
g_object_unref (task);
}
g_list_free (self->priv->init_results);
self->priv->init_results = NULL;
}
static void
foo_init_async (GAsyncInitable *initable,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
Foo *self = FOO (initable);
GTask *task;
task = g_task_new (initable, cancellable, callback, user_data);
g_task_set_name (task, G_STRFUNC);
switch (self->priv->state)
{
case NOT_INITIALIZED:
_foo_get_ready (self);
self->priv->init_results = g_list_append (self->priv->init_results,
task);
self->priv->state = INITIALIZING;
break;
case INITIALIZING:
self->priv->init_results = g_list_append (self->priv->init_results,
task);
break;
case INITIALIZED:
if (!self->priv->success)
g_task_return_new_error (task, ...);
else
g_task_return_boolean (task, TRUE);
g_object_unref (task);
break;
}
}
static gboolean
foo_init_finish (GAsyncInitable *initable,
GAsyncResult *result,
GError **error)
{
g_return_val_if_fail (g_task_is_valid (result, initable), FALSE);
return g_task_propagate_boolean (G_TASK (result), error);
}
static void
foo_async_initable_iface_init (gpointer g_iface,
gpointer data)
{
GAsyncInitableIface *iface = g_iface;
iface->init_async = foo_init_async;
iface->init_finish = foo_init_finish;
}
Implements
Implementations§
source§impl AsyncInitable
impl AsyncInitable
sourcepub fn new<O: IsClass + IsA<Object> + IsA<AsyncInitable>, Q: FnOnce(Result<O, Error>) + 'static>(
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: Q
)
pub fn new<O: IsClass + IsA<Object> + IsA<AsyncInitable>, Q: FnOnce(Result<O, Error>) + 'static>( io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: Q )
Create a new instance of an async initable object with the default property values.
Similar to Object::new
but can fail because the object initialization in
AsyncInitable::init
failed.
sourcepub fn new_future<O: IsClass + IsA<Object> + IsA<AsyncInitable>>(
io_priority: Priority
) -> Pin<Box_<dyn Future<Output = Result<O, Error>> + 'static>>
pub fn new_future<O: IsClass + IsA<Object> + IsA<AsyncInitable>>( io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<O, Error>> + 'static>>
Create a new instance of an async initable object with the default property values as future.
Similar to Object::new
but can fail because the object initialization in
AsyncInitable::init
failed.
sourcepub fn with_type<Q: FnOnce(Result<Object, Error>) + 'static>(
type_: Type,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: Q
)
pub fn with_type<Q: FnOnce(Result<Object, Error>) + 'static>( type_: Type, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: Q )
Create a new instance of an async initable object of the given type with the default property values.
Similar to Object::with_type
but can fail because the object initialization in
AsyncInitable::init
failed.
sourcepub fn with_type_future(
type_: Type,
io_priority: Priority
) -> Pin<Box_<dyn Future<Output = Result<Object, Error>> + 'static>>
pub fn with_type_future( type_: Type, io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<Object, Error>> + 'static>>
Create a new instance of an async initable object of the given type with the default property values as future.
Similar to Object::with_type
but can fail because the object initialization in
AsyncInitable::init
failed.
sourcepub fn with_mut_values<Q: FnOnce(Result<Object, Error>) + 'static>(
type_: Type,
properties: &mut [(&str, Value)],
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: Q
)
pub fn with_mut_values<Q: FnOnce(Result<Object, Error>) + 'static>( type_: Type, properties: &mut [(&str, Value)], io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: Q )
Create a new instance of an async initable object of the given type with the given properties as mutable values.
Similar to Object::with_mut_values
but can fail because the object initialization in
AsyncInitable::init
failed.
sourcepub fn with_mut_values_future(
type_: Type,
properties: &mut [(&str, Value)],
io_priority: Priority
) -> Pin<Box_<dyn Future<Output = Result<Object, Error>> + 'static>>
pub fn with_mut_values_future( type_: Type, properties: &mut [(&str, Value)], io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<Object, Error>> + 'static>>
Create a new instance of an async initable object of the given type with the given properties as mutable values as a future.
Similar to Object::with_mut_values
but can fail because the object initialization in
AsyncInitable::init
failed.
sourcepub fn builder<'a, O: IsA<Object> + IsClass + IsA<AsyncInitable>>(
) -> AsyncInitableBuilder<'a, O>
pub fn builder<'a, O: IsA<Object> + IsClass + IsA<AsyncInitable>>( ) -> AsyncInitableBuilder<'a, O>
Create a new object builder for a specific type.
sourcepub fn builder_with_type<'a>(type_: Type) -> AsyncInitableBuilder<'a, Object>
pub fn builder_with_type<'a>(type_: Type) -> AsyncInitableBuilder<'a, Object>
Create a new object builder for a specific type.
source§impl AsyncInitable
impl AsyncInitable
pub const NONE: Option<&'static AsyncInitable> = None
Trait Implementations§
source§impl Clone for AsyncInitable
impl Clone for AsyncInitable
source§impl Debug for AsyncInitable
impl Debug for AsyncInitable
source§impl Display for AsyncInitable
impl Display for AsyncInitable
source§impl HasParamSpec for AsyncInitable
impl HasParamSpec for AsyncInitable
type ParamSpec = ParamSpecObject
§type SetValue = AsyncInitable
type SetValue = AsyncInitable
type BuilderFn = fn(_: &str) -> ParamSpecObjectBuilder<'_, AsyncInitable>
fn param_spec_builder() -> Self::BuilderFn
source§impl Hash for AsyncInitable
impl Hash for AsyncInitable
source§impl<T: AsyncInitableImpl> IsImplementable<T> for AsyncInitable
impl<T: AsyncInitableImpl> IsImplementable<T> for AsyncInitable
source§fn interface_init(iface: &mut Interface<Self>)
fn interface_init(iface: &mut Interface<Self>)
source§fn instance_init(_instance: &mut InitializingObject<T>)
fn instance_init(_instance: &mut InitializingObject<T>)
source§impl Ord for AsyncInitable
impl Ord for AsyncInitable
source§impl<OT: ObjectType> PartialEq<OT> for AsyncInitable
impl<OT: ObjectType> PartialEq<OT> for AsyncInitable
source§impl<OT: ObjectType> PartialOrd<OT> for AsyncInitable
impl<OT: ObjectType> PartialOrd<OT> for AsyncInitable
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for AsyncInitable
impl StaticType for AsyncInitable
source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for AsyncInitable
impl IsA<AsyncInitable> for DBusConnection
impl IsA<AsyncInitable> for DBusProxy
Auto Trait Implementations§
impl RefUnwindSafe for AsyncInitable
impl !Send for AsyncInitable
impl !Sync for AsyncInitable
impl Unpin for AsyncInitable
impl UnwindSafe for AsyncInitable
Blanket Implementations§
source§impl<O> AsyncInitableExt for Owhere
O: IsA<AsyncInitable>,
impl<O> AsyncInitableExt for Owhere
O: IsA<AsyncInitable>,
source§unsafe fn init_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
unsafe fn init_async<P: FnOnce(Result<(), Error>) + 'static>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P )
Initable
you can
optionally call InitableExt::init()
instead. Read moreunsafe fn init_future( &self, io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
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
source§impl<T> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
source§fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
T
. Read moresource§fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
T
. Read moresource§fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
T
. Read moresource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
T
. Read moresource§fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while upcast
will do many checks at compile-time already. downcast
will
perform the same checks at runtime as dynamic_cast
, but will also ensure some amount of
compile-time safety. Read moresource§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read moresource§unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
T
unconditionally. Read moresource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
&T
unconditionally. Read moresource§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
source§impl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
source§fn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
true
if the object is an instance of (can be cast to) T
.source§fn object_class(&self) -> &Class<Object>
fn object_class(&self) -> &Class<Object>
ObjectClass
of the object. Read moresource§fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
T
. Read moresource§fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
T
of the object. Read moresource§fn set_property_from_value(&self, property_name: &str, value: &Value)
fn set_property_from_value(&self, property_name: &str, value: &Value)
source§fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
source§fn set_properties_from_value(&self, property_values: &[(&str, Value)])
fn set_properties_from_value(&self, property_values: &[(&str, Value)])
source§fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
property_name
of the object and cast it to the type V. Read moresource§fn property_value(&self, property_name: &str) -> Value
fn property_value(&self, property_name: &str) -> Value
property_name
of the object. Read moresource§fn property_type(&self, property_name: &str) -> Option<Type>
fn property_type(&self, property_name: &str) -> Option<Type>
property_name
of this object. Read moresource§fn find_property(&self, property_name: &str) -> Option<ParamSpec>
fn find_property(&self, property_name: &str) -> Option<ParamSpec>
ParamSpec
of the property property_name
of this object.source§fn list_properties(&self) -> PtrSlice<ParamSpec>
fn list_properties(&self) -> PtrSlice<ParamSpec>
ParamSpec
of the properties of this object.source§fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
source§unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
key
. Read moresource§unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
key
. Read moresource§unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
key
. Read moresource§unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
key
. Read moresource§unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
key
. Read moresource§unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
key
. Read moresource§fn block_signal(&self, handler_id: &SignalHandlerId)
fn block_signal(&self, handler_id: &SignalHandlerId)
source§fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
source§fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
source§fn stop_signal_emission_by_name(&self, signal_name: &str)
fn stop_signal_emission_by_name(&self, signal_name: &str)
source§fn connect<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerId
fn connect<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerId
signal_name
on this object. Read moresource§fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerId
fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerId
signal_id
on this object. Read moresource§fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerId
fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerId
signal_name
on this object. Read moresource§fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerId
fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerId
signal_id
on this object. Read moresource§unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerId
unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerId
signal_name
on this object. Read moresource§unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerId
unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerId
signal_id
on this object. Read moresource§fn connect_closure(
&self,
signal_name: &str,
after: bool,
closure: RustClosure
) -> SignalHandlerId
fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure ) -> SignalHandlerId
signal_name
on this object. Read moresource§fn connect_closure_id(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
closure: RustClosure
) -> SignalHandlerId
fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure ) -> SignalHandlerId
signal_id
on this object. Read moresource§fn watch_closure(&self, closure: &impl AsRef<Closure>)
fn watch_closure(&self, closure: &impl AsRef<Closure>)
closure
to the lifetime of the object. When
the object’s reference count drops to zero, the closure will be
invalidated. An invalidated closure will ignore any calls to
invoke_with_values
, or
invoke
when using Rust closures.source§fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
source§fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
Self::emit
but takes Value
for the arguments.source§fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
source§fn emit_by_name_with_values(
&self,
signal_name: &str,
args: &[Value]
) -> Option<Value>
fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value] ) -> Option<Value>
source§fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue]
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue]
) -> Rwhere
R: TryFromClosureReturnValue,
source§fn emit_by_name_with_details_and_values(
&self,
signal_name: &str,
details: Quark,
args: &[Value]
) -> Option<Value>
fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value] ) -> Option<Value>
source§fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue]
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue]
) -> Rwhere
R: TryFromClosureReturnValue,
source§fn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value]
) -> Option<Value>
fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value] ) -> Option<Value>
source§fn disconnect(&self, handler_id: SignalHandlerId)
fn disconnect(&self, handler_id: SignalHandlerId)
source§fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify
signal of the object. Read moresource§fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify
signal of the object. Read moresource§unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F ) -> SignalHandlerId
notify
signal of the object. Read more