#[repr(transparent)]pub struct DBusProxy { /* private fields */ }
Expand description
DBusProxy
is a base class used for proxies to access a D-Bus
interface on a remote object. A DBusProxy
can be constructed for
both well-known and unique names.
By default, DBusProxy
will cache all properties (and listen to
changes) of the remote object, and proxy all signals that get
emitted. This behaviour can be changed by passing suitable
DBusProxyFlags
when the proxy is created. If the proxy is for a
well-known name, the property cache is flushed when the name owner
vanishes and reloaded when a name owner appears.
The unique name owner of the proxy’s name is tracked and can be read from
g-name-owner
. Connect to the notify
signal to
get notified of changes. Additionally, only signals and property
changes emitted from the current name owner are considered and
calls are always sent to the current name owner. This avoids a
number of race conditions when the name is lost by one owner and
claimed by another. However, if no name owner currently exists,
then calls will be sent to the well-known name which may result in
the message bus launching an owner (unless
DBusProxyFlags::DO_NOT_AUTO_START
is set).
If the proxy is for a stateless D-Bus service, where the name owner may
be started and stopped between calls, the g-name-owner
tracking
of DBusProxy
will cause the proxy to drop signal and property changes from
the service after it has restarted for the first time. When interacting
with a stateless D-Bus service, do not use DBusProxy
— use direct D-Bus
method calls and signal connections.
The generic g-properties-changed
and
g-signal
signals are not very convenient to work with.
Therefore, the recommended way of working with proxies is to subclass
DBusProxy
, and have more natural properties and signals in your derived
class. This [example][gdbus-example-gdbus-codegen] shows how this can
easily be done using the [gdbus-codegen][gdbus-codegen] tool.
A DBusProxy
instance can be used from multiple threads but note
that all signals (e.g. g-signal
, g-properties-changed
and notify
) are emitted in the
[thread-default main context][g-main-context-push-thread-default]
of the thread where the instance was constructed.
An example using a proxy for a well-known name can be found in gdbus-example-watch-proxy.c
Properties
g-bus-type
If this property is not BusType::None
, then
g-connection
must be None
and will be set to the
DBusConnection
obtained by calling bus_get()
with the value
of this property.
Writeable | Construct Only
g-connection
The DBusConnection
the proxy is for.
Readable | Writeable | Construct Only
g-default-timeout
The timeout to use if -1 (specifying default timeout) is passed
as timeout_msec
in the DBusProxyExt::call()
and
DBusProxyExt::call_sync()
functions.
This allows applications to set a proxy-wide timeout for all
remote method invocations on the proxy. If this property is -1,
the default timeout (typically 25 seconds) is used. If set to
G_MAXINT
, then no timeout is used.
Readable | Writeable | Construct
g-flags
Flags from the DBusProxyFlags
enumeration.
Readable | Writeable | Construct Only
g-interface-info
Ensure that interactions with this proxy conform to the given
interface. This is mainly to ensure that malformed data received
from the other peer is ignored. The given DBusInterfaceInfo
is
said to be the “expected interface”.
The checks performed are:
-
When completing a method call, if the type signature of the reply message isn’t what’s expected, the reply is discarded and the
glib::Error
is set toIOErrorEnum::InvalidArgument
. -
Received signals that have a type signature mismatch are dropped and a warning is logged via
g_warning()
. -
Properties received via the initial
GetAll()
call or via the::PropertiesChanged
signal (on the org.freedesktop.DBus.Properties interface) or set usingDBusProxyExt::set_cached_property()
with a type signature mismatch are ignored and a warning is logged viag_warning()
.
Note that these checks are never done on methods, signals and
properties that are not referenced in the given
DBusInterfaceInfo
, since extending a D-Bus interface on the
service-side is not considered an ABI break.
Readable | Writeable
g-interface-name
The D-Bus interface name the proxy is for.
Readable | Writeable | Construct Only
g-name
The well-known or unique name that the proxy is for.
Readable | Writeable | Construct Only
g-name-owner
The unique name that owns g-name
or None
if no-one
currently owns that name. You may connect to notify
signal to
track changes to this property.
Readable
g-object-path
The object path the proxy is for.
Readable | Writeable | Construct Only
Signals
g-properties-changed
Emitted when one or more D-Bus properties on proxy
changes. The
local cache has already been updated when this signal fires. Note
that both changed_properties
and invalidated_properties
are
guaranteed to never be None
(either may be empty though).
If the proxy has the flag
DBusProxyFlags::GET_INVALIDATED_PROPERTIES
set, then
invalidated_properties
will always be empty.
This signal corresponds to the
PropertiesChanged
D-Bus signal on the
org.freedesktop.DBus.Properties
interface.
g-signal
Emitted when a signal from the remote object and interface that proxy
is for, has been received.
Since 2.72 this signal supports detailed connections. You can connect to
the detailed signal g-signal::x
in order to receive callbacks only when
signal x
is received from the remote object.
Detailed
Implements
DBusProxyExt
, glib::ObjectExt
, AsyncInitableExt
, DBusInterfaceExt
, InitableExt
, DBusProxyExtManual
Implementations§
source§impl DBusProxy
impl DBusProxy
pub const NONE: Option<&'static DBusProxy> = None
sourcepub fn for_bus_sync(
bus_type: BusType,
flags: DBusProxyFlags,
info: Option<&DBusInterfaceInfo>,
name: &str,
object_path: &str,
interface_name: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<DBusProxy, Error>
pub fn for_bus_sync( bus_type: BusType, flags: DBusProxyFlags, info: Option<&DBusInterfaceInfo>, name: &str, object_path: &str, interface_name: &str, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<DBusProxy, Error>
Like new_sync()
but takes a BusType
instead of a DBusConnection
.
DBusProxy
is used in this [example][gdbus-wellknown-proxy].
bus_type
A BusType
.
flags
Flags used when constructing the proxy.
info
A DBusInterfaceInfo
specifying the minimal interface
that proxy
conforms to or None
.
name
A bus name (well-known or unique).
object_path
An object path.
interface_name
A D-Bus interface name.
cancellable
A Cancellable
or None
.
Returns
A DBusProxy
or None
if error is set.
Free with g_object_unref()
.
sourcepub fn new_sync(
connection: &DBusConnection,
flags: DBusProxyFlags,
info: Option<&DBusInterfaceInfo>,
name: Option<&str>,
object_path: &str,
interface_name: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<DBusProxy, Error>
pub fn new_sync( connection: &DBusConnection, flags: DBusProxyFlags, info: Option<&DBusInterfaceInfo>, name: Option<&str>, object_path: &str, interface_name: &str, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<DBusProxy, Error>
Creates a proxy for accessing interface_name
on the remote object
at object_path
owned by name
at connection
and synchronously
loads D-Bus properties unless the
DBusProxyFlags::DO_NOT_LOAD_PROPERTIES
flag is used.
If the DBusProxyFlags::DO_NOT_CONNECT_SIGNALS
flag is not set, also sets up
match rules for signals. Connect to the g-signal
signal
to handle signals from the remote object.
If both DBusProxyFlags::DO_NOT_LOAD_PROPERTIES
and
DBusProxyFlags::DO_NOT_CONNECT_SIGNALS
are set, this constructor is
guaranteed to return immediately without blocking.
If name
is a well-known name and the
DBusProxyFlags::DO_NOT_AUTO_START
and DBusProxyFlags::DO_NOT_AUTO_START_AT_CONSTRUCTION
flags aren’t set and no name owner currently exists, the message bus
will be requested to launch a name owner for the name.
This is a synchronous failable constructor. See new()
and g_dbus_proxy_new_finish()
for the asynchronous version.
DBusProxy
is used in this [example][gdbus-wellknown-proxy].
connection
flags
Flags used when constructing the proxy.
info
A DBusInterfaceInfo
specifying the minimal interface that proxy
conforms to or None
.
name
A bus name (well-known or unique) or None
if connection
is not a message bus connection.
object_path
An object path.
interface_name
A D-Bus interface name.
cancellable
A Cancellable
or None
.
Returns
A DBusProxy
or None
if error is set.
Free with g_object_unref()
.
sourcepub fn new<P: FnOnce(Result<DBusProxy, Error>) + 'static>(
connection: &DBusConnection,
flags: DBusProxyFlags,
info: Option<&DBusInterfaceInfo>,
name: Option<&str>,
object_path: &str,
interface_name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
pub fn new<P: FnOnce(Result<DBusProxy, Error>) + 'static>( connection: &DBusConnection, flags: DBusProxyFlags, info: Option<&DBusInterfaceInfo>, name: Option<&str>, object_path: &str, interface_name: &str, cancellable: Option<&impl IsA<Cancellable>>, callback: P )
Creates a proxy for accessing interface_name
on the remote object
at object_path
owned by name
at connection
and asynchronously
loads D-Bus properties unless the
DBusProxyFlags::DO_NOT_LOAD_PROPERTIES
flag is used. Connect to
the g-properties-changed
signal to get notified about
property changes.
If the DBusProxyFlags::DO_NOT_CONNECT_SIGNALS
flag is not set, also sets up
match rules for signals. Connect to the g-signal
signal
to handle signals from the remote object.
If both DBusProxyFlags::DO_NOT_LOAD_PROPERTIES
and
DBusProxyFlags::DO_NOT_CONNECT_SIGNALS
are set, this constructor is
guaranteed to complete immediately without blocking.
If name
is a well-known name and the
DBusProxyFlags::DO_NOT_AUTO_START
and DBusProxyFlags::DO_NOT_AUTO_START_AT_CONSTRUCTION
flags aren’t set and no name owner currently exists, the message bus
will be requested to launch a name owner for the name.
This is a failable asynchronous constructor - when the proxy is
ready, callback
will be invoked and you can use
g_dbus_proxy_new_finish()
to get the result.
See new_sync()
and for a synchronous version of this constructor.
DBusProxy
is used in this [example][gdbus-wellknown-proxy].
connection
flags
Flags used when constructing the proxy.
info
A DBusInterfaceInfo
specifying the minimal interface that proxy
conforms to or None
.
name
A bus name (well-known or unique) or None
if connection
is not a message bus connection.
object_path
An object path.
interface_name
A D-Bus interface name.
cancellable
A Cancellable
or None
.
callback
Callback function to invoke when the proxy is ready.
pub fn new_future( connection: &DBusConnection, flags: DBusProxyFlags, info: Option<&DBusInterfaceInfo>, name: Option<&str>, object_path: &str, interface_name: &str ) -> Pin<Box_<dyn Future<Output = Result<DBusProxy, Error>> + 'static>>
sourcepub fn for_bus<P: FnOnce(Result<DBusProxy, Error>) + 'static>(
bus_type: BusType,
flags: DBusProxyFlags,
info: Option<&DBusInterfaceInfo>,
name: &str,
object_path: &str,
interface_name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
pub fn for_bus<P: FnOnce(Result<DBusProxy, Error>) + 'static>( bus_type: BusType, flags: DBusProxyFlags, info: Option<&DBusInterfaceInfo>, name: &str, object_path: &str, interface_name: &str, cancellable: Option<&impl IsA<Cancellable>>, callback: P )
Like new()
but takes a BusType
instead of a DBusConnection
.
DBusProxy
is used in this [example][gdbus-wellknown-proxy].
bus_type
A BusType
.
flags
Flags used when constructing the proxy.
info
A DBusInterfaceInfo
specifying the minimal interface that proxy
conforms to or None
.
name
A bus name (well-known or unique).
object_path
An object path.
interface_name
A D-Bus interface name.
cancellable
A Cancellable
or None
.
callback
Callback function to invoke when the proxy is ready.
pub fn for_bus_future( bus_type: BusType, flags: DBusProxyFlags, info: Option<&DBusInterfaceInfo>, name: &str, object_path: &str, interface_name: &str ) -> Pin<Box_<dyn Future<Output = Result<DBusProxy, Error>> + 'static>>
Trait Implementations§
source§impl HasParamSpec for DBusProxy
impl HasParamSpec for DBusProxy
source§impl Ord for DBusProxy
impl Ord for DBusProxy
source§impl<OT: ObjectType> PartialEq<OT> for DBusProxy
impl<OT: ObjectType> PartialEq<OT> for DBusProxy
source§impl<OT: ObjectType> PartialOrd<OT> for DBusProxy
impl<OT: ObjectType> PartialOrd<OT> for DBusProxy
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 DBusProxy
impl StaticType for DBusProxy
source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for DBusProxy
impl IsA<AsyncInitable> for DBusProxy
impl IsA<DBusInterface> for DBusProxy
impl IsA<Initable> for DBusProxy
impl Send for DBusProxy
impl Sync for DBusProxy
Auto Trait Implementations§
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>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)where
P: FnOnce(Result<(), Error>) + 'static,
unsafe fn init_async<P>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P )where P: FnOnce(Result<(), Error>) + 'static,
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, Global>>
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: CanDowncast<T>,
fn downcast<T>(self) -> Result<T, Self>where T: ObjectType, Self: CanDowncast<T>,
T
. Read moresource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast_ref<T>(&self) -> Option<&T>where T: ObjectType, Self: CanDowncast<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<O> DBusInterfaceExt for Owhere
O: IsA<DBusInterface>,
impl<O> DBusInterfaceExt for Owhere O: IsA<DBusInterface>,
source§fn get(&self) -> Option<DBusObject>
fn get(&self) -> Option<DBusObject>
source§fn info(&self) -> DBusInterfaceInfo
fn info(&self) -> DBusInterfaceInfo
self
. Read moresource§fn set_object(&self, object: Option<&impl IsA<DBusObject>>)
fn set_object(&self, object: Option<&impl IsA<DBusObject>>)
source§impl<O> DBusProxyExt for Owhere
O: IsA<DBusProxy>,
impl<O> DBusProxyExt for Owhere O: IsA<DBusProxy>,
source§fn call<P>(
&self,
method_name: &str,
parameters: Option<&Variant>,
flags: DBusCallFlags,
timeout_msec: i32,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)where
P: FnOnce(Result<Variant, Error>) + 'static,
fn call<P>( &self, method_name: &str, parameters: Option<&Variant>, flags: DBusCallFlags, timeout_msec: i32, cancellable: Option<&impl IsA<Cancellable>>, callback: P )where P: FnOnce(Result<Variant, Error>) + 'static,
fn call_future( &self, method_name: &str, parameters: Option<&Variant>, flags: DBusCallFlags, timeout_msec: i32 ) -> Pin<Box<dyn Future<Output = Result<Variant, Error>> + 'static, Global>>
source§fn call_sync(
&self,
method_name: &str,
parameters: Option<&Variant>,
flags: DBusCallFlags,
timeout_msec: i32,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Variant, Error>
fn call_sync( &self, method_name: &str, parameters: Option<&Variant>, flags: DBusCallFlags, timeout_msec: i32, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<Variant, Error>
source§fn call_with_unix_fd_list<P>(
&self,
method_name: &str,
parameters: Option<&Variant>,
flags: DBusCallFlags,
timeout_msec: i32,
fd_list: Option<&impl IsA<UnixFDList>>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)where
P: FnOnce(Result<(Variant, UnixFDList), Error>) + 'static,
fn call_with_unix_fd_list<P>( &self, method_name: &str, parameters: Option<&Variant>, flags: DBusCallFlags, timeout_msec: i32, fd_list: Option<&impl IsA<UnixFDList>>, cancellable: Option<&impl IsA<Cancellable>>, callback: P )where P: FnOnce(Result<(Variant, UnixFDList), Error>) + 'static,
source§fn call_with_unix_fd_list_future(
&self,
method_name: &str,
parameters: Option<&Variant>,
flags: DBusCallFlags,
timeout_msec: i32,
fd_list: Option<&impl IsA<UnixFDList> + Clone + 'static>
) -> Pin<Box<dyn Future<Output = Result<(Variant, UnixFDList), Error>> + 'static, Global>>
fn call_with_unix_fd_list_future( &self, method_name: &str, parameters: Option<&Variant>, flags: DBusCallFlags, timeout_msec: i32, fd_list: Option<&impl IsA<UnixFDList> + Clone + 'static> ) -> Pin<Box<dyn Future<Output = Result<(Variant, UnixFDList), Error>> + 'static, Global>>
source§fn call_with_unix_fd_list_sync(
&self,
method_name: &str,
parameters: Option<&Variant>,
flags: DBusCallFlags,
timeout_msec: i32,
fd_list: Option<&impl IsA<UnixFDList>>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(Variant, UnixFDList), Error>
fn call_with_unix_fd_list_sync( &self, method_name: &str, parameters: Option<&Variant>, flags: DBusCallFlags, timeout_msec: i32, fd_list: Option<&impl IsA<UnixFDList>>, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(Variant, UnixFDList), Error>
source§fn cached_property(&self, property_name: &str) -> Option<Variant>
fn cached_property(&self, property_name: &str) -> Option<Variant>
source§fn cached_property_names(&self) -> Vec<GString, Global>
fn cached_property_names(&self) -> Vec<GString, Global>
self
. Read moresource§fn connection(&self) -> DBusConnection
fn connection(&self) -> DBusConnection
self
is for. Read moresource§fn default_timeout(&self) -> i32
fn default_timeout(&self) -> i32
timeout_msec
in the call()
and
call_sync()
functions. Read moresource§fn flags(&self) -> DBusProxyFlags
fn flags(&self) -> DBusProxyFlags
self
was constructed with. Read moresource§fn interface_info(&self) -> Option<DBusInterfaceInfo>
fn interface_info(&self) -> Option<DBusInterfaceInfo>
DBusInterfaceInfo
, if any, specifying the interface
that self
conforms to. See the g-interface-info
property for more details. Read moresource§fn interface_name(&self) -> GString
fn interface_name(&self) -> GString
self
is for. Read moresource§fn name_owner(&self) -> Option<GString>
fn name_owner(&self) -> Option<GString>
self
is for or None
if
no-one currently owns that name. You may connect to the
notify
signal to track changes to the
g-name-owner
property. Read moresource§fn object_path(&self) -> GString
fn object_path(&self) -> GString
self
is for. Read moresource§fn set_default_timeout(&self, timeout_msec: i32)
fn set_default_timeout(&self, timeout_msec: i32)
timeout_msec
in the call()
and
call_sync()
functions. Read moresource§fn set_interface_info(&self, info: Option<&DBusInterfaceInfo>)
fn set_interface_info(&self, info: Option<&DBusInterfaceInfo>)
self
conform to the given
interface. See the g-interface-info
property for more
details. Read moresource§fn g_connection(&self) -> Option<DBusConnection>
fn g_connection(&self) -> Option<DBusConnection>
DBusConnection
the proxy is for.source§fn g_default_timeout(&self) -> i32
fn g_default_timeout(&self) -> i32
timeout_msec
in the call()
and
call_sync()
functions. Read moresource§fn set_g_default_timeout(&self, g_default_timeout: i32)
fn set_g_default_timeout(&self, g_default_timeout: i32)
timeout_msec
in the call()
and
call_sync()
functions. Read moresource§fn g_flags(&self) -> DBusProxyFlags
fn g_flags(&self) -> DBusProxyFlags
DBusProxyFlags
enumeration.source§fn g_interface_info(&self) -> Option<DBusInterfaceInfo>
fn g_interface_info(&self) -> Option<DBusInterfaceInfo>
DBusInterfaceInfo
is
said to be the “expected interface”. Read moresource§fn set_g_interface_info(&self, g_interface_info: Option<&DBusInterfaceInfo>)
fn set_g_interface_info(&self, g_interface_info: Option<&DBusInterfaceInfo>)
DBusInterfaceInfo
is
said to be the “expected interface”. Read moresource§fn g_interface_name(&self) -> Option<GString>
fn g_interface_name(&self) -> Option<GString>
source§fn g_name_owner(&self) -> Option<GString>
fn g_name_owner(&self) -> Option<GString>
source§fn g_object_path(&self) -> Option<GString>
fn g_object_path(&self) -> Option<GString>
fn connect_g_default_timeout_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + Send + Sync + 'static,
fn connect_g_interface_info_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + Send + Sync + 'static,
fn connect_g_name_owner_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + Send + Sync + 'static,
source§impl<O> DBusProxyExtManual for Owhere
O: IsA<DBusProxy>,
impl<O> DBusProxyExtManual for Owhere O: IsA<DBusProxy>,
source§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<O> InitableExt for Owhere
O: IsA<Initable>,
impl<O> InitableExt for Owhere O: IsA<Initable>,
source§impl<T> IntoClosureReturnValue for Twhere
T: Into<Value>,
impl<T> IntoClosureReturnValue for Twhere T: Into<Value>,
fn into_closure_return_value(self) -> Option<Value>
source§impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
impl<U> IsSubclassableExt for Uwhere U: IsClass + ParentClassIs,
fn parent_class_init<T>(class: &mut Class<U>)where T: ObjectSubclass, <U as ParentClassIs>::Parent: IsSubclassable<T>,
fn parent_instance_init<T>(instance: &mut InitializingObject<T>)where T: ObjectSubclass, <U as ParentClassIs>::Parent: IsSubclassable<T>,
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
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
fn connect<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
signal_name
on this object. Read moresource§fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
signal_id
on this object. Read moresource§fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value> + 'static,
fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + 'static,
signal_name
on this object. Read moresource§fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value> + 'static,
fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + 'static,
signal_id
on this object. Read moresource§unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value>,
unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value>,
signal_name
on this object. Read moresource§unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value>,
unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value>,
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) -> SignalHandlerIdwhere
F: Fn(&T, &ParamSpec) + Send + Sync + 'static,
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere F: Fn(&T, &ParamSpec) + Send + Sync + 'static,
notify
signal of the object. Read moresource§fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere
F: Fn(&T, &ParamSpec) + 'static,
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere F: Fn(&T, &ParamSpec) + 'static,
notify
signal of the object. Read moresource§unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerIdwhere
F: Fn(&T, &ParamSpec),
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F ) -> SignalHandlerIdwhere F: Fn(&T, &ParamSpec),
notify
signal of the object. Read moresource§fn notify(&self, property_name: &str)
fn notify(&self, property_name: &str)
source§fn notify_by_pspec(&self, pspec: &ParamSpec)
fn notify_by_pspec(&self, pspec: &ParamSpec)
source§fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + Send + 'static,
fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>where F: FnOnce() + Send + 'static,
source§fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + 'static,
fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where F: FnOnce() + 'static,
source§fn bind_property<'f, 't, O, 'a>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
fn bind_property<'f, 't, O, 'a>( &'a self, source_property: &'a str, target: &'a O, target_property: &'a str ) -> BindingBuilder<'a, 'f, 't>where O: ObjectType,
source§unsafe fn run_dispose(&self)
unsafe fn run_dispose(&self)
source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere T: HasParamSpec,
source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere T: StaticType,
source§fn ensure_type()
fn ensure_type()
source§impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for Twhere T: Send + ToValue + ?Sized,
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.