pub struct SocketClient { /* private fields */ }
Expand description
GSocketClient
is a lightweight high-level utility class for connecting to
a network host using a connection oriented socket type.
You create a GSocketClient
object, set any options you want, and then
call a sync or async connect operation, which returns a
SocketConnection
subclass on success.
The type of the SocketConnection
object returned depends on the
type of the underlying socket that is in use. For instance, for a TCP/IP
connection it will be a TcpConnection
.
As GSocketClient
is a lightweight object, you don’t need to cache it. You
can just create a new one any time you need one.
§Properties
§enable-proxy
Enable proxy support.
Readable | Writeable | Construct
§family
The address family to use for socket construction.
Readable | Writeable | Construct
§local-address
The local address constructed sockets will be bound to.
Readable | Writeable | Construct
§protocol
The protocol to use for socket construction, or 0
for default.
Readable | Writeable | Construct
§proxy-resolver
The proxy resolver to use
Readable | Writeable | Construct
§timeout
The I/O timeout for sockets, in seconds, or 0
for none.
Readable | Writeable | Construct
§tls
Whether to create TLS connections.
Readable | Writeable | Construct
§tls-validation-flags
The TLS validation flags used when creating TLS connections. The
default value is TlsCertificateFlags::VALIDATE_ALL
.
GLib guarantees that if certificate verification fails, at least one
flag will be set, but it does not guarantee that all possible flags
will be set. Accordingly, you may not safely decide to ignore any
particular type of error. For example, it would be incorrect to mask
TlsCertificateFlags::EXPIRED
if you want to allow expired certificates,
because this could potentially be the only error flag set even if
other problems exist with the certificate. Therefore, there is no
safe way to use this property. This is not a horrible problem,
though, because you should not be attempting to ignore validation
errors anyway. If you really must ignore TLS certificate errors,
connect to the #GSocketClient::event signal, wait for it to be
emitted with SocketClientEvent::TlsHandshaking
, and use that to
connect to #GTlsConnection::accept-certificate.
Readable | Writeable | Construct
§type
The type to use for socket construction.
Readable | Writeable | Construct
§Signals
§event
Emitted when @client’s activity on @connectable changes state. Among other things, this can be used to provide progress information about a network connection in the UI. The meanings of the different @event values are as follows:
-
SocketClientEvent::Resolving
: @client is about to look up @connectable in DNS. @connection will beNone
. -
SocketClientEvent::Resolved
: @client has successfully resolved @connectable in DNS. @connection will beNone
. -
SocketClientEvent::Connecting
: @client is about to make a connection to a remote host; either a proxy server or the destination server itself. @connection is the #GSocketConnection, which is not yet connected. Since GLib 2.40, you can access the remote address via g_socket_connection_get_remote_address(). -
SocketClientEvent::Connected
: @client has successfully connected to a remote host. @connection is the connected #GSocketConnection. -
SocketClientEvent::ProxyNegotiating
: @client is about to negotiate with a proxy to get it to connect to @connectable. @connection is the #GSocketConnection to the proxy server. -
SocketClientEvent::ProxyNegotiated
: @client has negotiated a connection to @connectable through a proxy server. @connection is the stream returned from g_proxy_connect(), which may or may not be a #GSocketConnection. -
SocketClientEvent::TlsHandshaking
: @client is about to begin a TLS handshake. @connection is a #GTlsClientConnection. -
SocketClientEvent::TlsHandshaked
: @client has successfully completed the TLS handshake. @connection is a #GTlsClientConnection. -
SocketClientEvent::Complete
: @client has either successfully connected to @connectable (in which case @connection is the #GSocketConnection that it will be returning to the caller) or has failed (in which case @connection isNone
and the client is about to return an error).
Each event except SocketClientEvent::Complete
may be emitted
multiple times (or not at all) for a given connectable (in
particular, if @client ends up attempting to connect to more than
one address). However, if @client emits the #GSocketClient::event
signal at all for a given connectable, then it will always emit
it with SocketClientEvent::Complete
when it is done.
Note that there may be additional #GSocketClientEvent values in the future; unrecognized @event values should be ignored.
§Implements
SocketClientExt
, [trait@glib::ObjectExt
]
GLib type: GObject with reference counted clone semantics.
Implementations§
Source§impl SocketClient
impl SocketClient
pub const NONE: Option<&'static SocketClient> = None
Sourcepub fn new() -> SocketClient
pub fn new() -> SocketClient
Creates a new #GSocketClient with the default options.
§Returns
a #GSocketClient. Free the returned object with g_object_unref().
Trait Implementations§
Source§impl Clone for SocketClient
impl Clone for SocketClient
Source§impl Debug for SocketClient
impl Debug for SocketClient
Source§impl Default for SocketClient
impl Default for SocketClient
Source§impl HasParamSpec for SocketClient
impl HasParamSpec for SocketClient
type ParamSpec = ParamSpecObject
Source§type SetValue = SocketClient
type SetValue = SocketClient
type BuilderFn = fn(_: &str) -> ParamSpecObjectBuilder<'_, SocketClient>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for SocketClient
impl Hash for SocketClient
Source§impl Ord for SocketClient
impl Ord for SocketClient
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
Comparison for two GObjects.
Compares the memory addresses of the provided objects.
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl ParentClassIs for SocketClient
impl ParentClassIs for SocketClient
Source§impl<OT: ObjectType> PartialEq<OT> for SocketClient
impl<OT: ObjectType> PartialEq<OT> for SocketClient
Source§impl<OT: ObjectType> PartialOrd<OT> for SocketClient
impl<OT: ObjectType> PartialOrd<OT> for SocketClient
Source§impl StaticType for SocketClient
impl StaticType for SocketClient
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for SocketClient
Auto Trait Implementations§
impl Freeze for SocketClient
impl RefUnwindSafe for SocketClient
impl !Send for SocketClient
impl !Sync for SocketClient
impl Unpin for SocketClient
impl UnwindSafe for SocketClient
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
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
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>)
fn parent_instance_init<T>(instance: &mut InitializingObject<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 has_property(&self, property_name: &str) -> bool
fn has_property(&self, property_name: &str) -> bool
property_name
.Source§fn has_property_with_type(&self, property_name: &str, type_: Type) -> bool
fn has_property_with_type(&self, property_name: &str, type_: Type) -> bool
property_name
of the given type_
.Source§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 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>
fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
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<'a, 'f, 't, O>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str,
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
fn bind_property<'a, 'f, 't, O>(
&'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<O> SocketClientExt for Owhere
O: IsA<SocketClient>,
impl<O> SocketClientExt for Owhere
O: IsA<SocketClient>,
Source§fn add_application_proxy(&self, protocol: &str)
fn add_application_proxy(&self, protocol: &str)
Source§fn connect(
&self,
connectable: &impl IsA<SocketConnectable>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<SocketConnection, Error>
fn connect( &self, connectable: &impl IsA<SocketConnectable>, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<SocketConnection, Error>
Source§fn connect_async<P: FnOnce(Result<SocketConnection, Error>) + 'static>(
&self,
connectable: &impl IsA<SocketConnectable>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn connect_async<P: FnOnce(Result<SocketConnection, Error>) + 'static>( &self, connectable: &impl IsA<SocketConnectable>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn connect_future( &self, connectable: &(impl IsA<SocketConnectable> + Clone + 'static), ) -> Pin<Box_<dyn Future<Output = Result<SocketConnection, Error>> + 'static>>
Source§fn connect_to_host(
&self,
host_and_port: &str,
default_port: u16,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<SocketConnection, Error>
fn connect_to_host( &self, host_and_port: &str, default_port: u16, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<SocketConnection, Error>
Source§fn connect_to_host_async<P: FnOnce(Result<SocketConnection, Error>) + 'static>(
&self,
host_and_port: &str,
default_port: u16,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn connect_to_host_async<P: FnOnce(Result<SocketConnection, Error>) + 'static>( &self, host_and_port: &str, default_port: u16, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn connect_to_host_future( &self, host_and_port: &str, default_port: u16, ) -> Pin<Box_<dyn Future<Output = Result<SocketConnection, Error>> + 'static>>
Source§fn connect_to_service(
&self,
domain: &str,
service: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<SocketConnection, Error>
fn connect_to_service( &self, domain: &str, service: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<SocketConnection, Error>
Source§fn connect_to_service_async<P: FnOnce(Result<SocketConnection, Error>) + 'static>(
&self,
domain: &str,
service: &str,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn connect_to_service_async<P: FnOnce(Result<SocketConnection, Error>) + 'static>( &self, domain: &str, service: &str, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn connect_to_service_future( &self, domain: &str, service: &str, ) -> Pin<Box_<dyn Future<Output = Result<SocketConnection, Error>> + 'static>>
Source§fn connect_to_uri(
&self,
uri: &str,
default_port: u16,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<SocketConnection, Error>
fn connect_to_uri( &self, uri: &str, default_port: u16, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<SocketConnection, Error>
Source§fn connect_to_uri_async<P: FnOnce(Result<SocketConnection, Error>) + 'static>(
&self,
uri: &str,
default_port: u16,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn connect_to_uri_async<P: FnOnce(Result<SocketConnection, Error>) + 'static>( &self, uri: &str, default_port: u16, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn connect_to_uri_future( &self, uri: &str, default_port: u16, ) -> Pin<Box_<dyn Future<Output = Result<SocketConnection, Error>> + 'static>>
Source§fn enables_proxy(&self) -> bool
fn enables_proxy(&self) -> bool
Source§fn family(&self) -> SocketFamily
fn family(&self) -> SocketFamily
Source§fn local_address(&self) -> Option<SocketAddress>
fn local_address(&self) -> Option<SocketAddress>
Source§fn protocol(&self) -> SocketProtocol
fn protocol(&self) -> SocketProtocol
Source§fn proxy_resolver(&self) -> ProxyResolver
fn proxy_resolver(&self) -> ProxyResolver
Source§fn socket_type(&self) -> SocketType
fn socket_type(&self) -> SocketType
Source§fn is_tls(&self) -> bool
fn is_tls(&self) -> bool
Source§fn tls_validation_flags(&self) -> TlsCertificateFlags
fn tls_validation_flags(&self) -> TlsCertificateFlags
Source§fn set_enable_proxy(&self, enable: bool)
fn set_enable_proxy(&self, enable: bool)
Source§fn set_family(&self, family: SocketFamily)
fn set_family(&self, family: SocketFamily)
SocketFamily::Invalid
then the sockets created by this object will be of the specified
family. Read moreSource§fn set_local_address(&self, address: Option<&impl IsA<SocketAddress>>)
fn set_local_address(&self, address: Option<&impl IsA<SocketAddress>>)
Source§fn set_protocol(&self, protocol: SocketProtocol)
fn set_protocol(&self, protocol: SocketProtocol)
Source§fn set_proxy_resolver(&self, proxy_resolver: Option<&impl IsA<ProxyResolver>>)
fn set_proxy_resolver(&self, proxy_resolver: Option<&impl IsA<ProxyResolver>>)
Source§fn set_socket_type(&self, type_: SocketType)
fn set_socket_type(&self, type_: SocketType)
Source§fn set_timeout(&self, timeout: u32)
fn set_timeout(&self, timeout: u32)
Source§fn set_tls_validation_flags(&self, flags: TlsCertificateFlags)
fn set_tls_validation_flags(&self, flags: TlsCertificateFlags)
TlsCertificateFlags::VALIDATE_ALL
. Read more