pub struct Session { /* private fields */ }
Expand description
Soup session state object.
#SoupSession is the object that controls client-side HTTP. A #SoupSession encapsulates all of the state that libsoup is keeping on behalf of your program; cached HTTP connections, authentication information, etc. It also keeps track of various global options and features that you are using.
Most applications will only need a single #SoupSession; the primary
reason you might need multiple sessions is if you need to have
multiple independent authentication contexts. (Eg, you are
connecting to a server and authenticating as two different users at
different times; the easiest way to ensure that each Message
is sent with the authentication information you intended is to use
one session for the first user, and a second session for the other
user.)
Additional #SoupSession functionality is provided by
SessionFeature
objects, which can be added to a session with
SessionExt::add_feature()
or SessionExt::add_feature_by_type()
For example, Logger
provides support for
logging HTTP traffic, ContentDecoder
provides support for
compressed response handling, and ContentSniffer
provides
support for HTML5-style response body content sniffing.
Additionally, subtypes of Auth
can be added
as features, to add support for additional authentication types.
All SoupSession
s are created with a AuthManager
, and support
for SOUP_TYPE_AUTH_BASIC
and SOUP_TYPE_AUTH_DIGEST
. Additionally,
sessions using the plain #SoupSession class (rather than one of its deprecated
subtypes) have a ContentDecoder
by default.
Note that all async methods will invoke their callbacks on the thread-default context at the time of the function call.
§Properties
§accept-language
If non-None
, the value to use for the “Accept-Language” header
on Message
s sent from this session.
Setting this will disable accept-language-auto
.
Readable | Writeable
§accept-language-auto
If true
, #SoupSession will automatically set the string
for the “Accept-Language” header on every Message
sent, based on the return value of get_language_names()
.
Setting this will override any previous value of
accept-language
.
Readable | Writeable
§idle-timeout
Connection lifetime (in seconds) when idle. Any connection left idle longer than this will be closed.
Although you can change this property at any time, it will
only affect newly-created connections, not currently-open
ones. You can call SessionExt::abort()
after setting this
if you want to ensure that all future connections will have
this timeout value.
Readable | Writeable
§local-address
Sets the gio::InetSocketAddress
to use for the client side of
the connection.
Use this property if you want for instance to bind the local socket to a specific IP address.
Readable | Writeable | Construct Only
§max-conns
The maximum number of connections that the session can open at once.
Readable | Writeable | Construct Only
§max-conns-per-host
The maximum number of connections that the session can open at once to a given host.
Readable | Writeable | Construct Only
§proxy-resolver
A gio::ProxyResolver
to use with this session.
If no proxy resolver is set, then the default proxy resolver
will be used. See gio::ProxyResolver::default()
.
You can set it to None
if you don’t want to use proxies, or
set it to your own gio::ProxyResolver
if you want to control
what proxies get used.
Readable | Writeable
§remote-connectable
Sets a socket to make outgoing connections on. This will override the default behaviour of opening TCP/IP sockets to the hosts specified in the URIs.
This function is not required for common HTTP usage, but only when connecting
to a HTTP service that is not using standard TCP/IP sockets. An example of
this is a local service that uses HTTP over UNIX-domain sockets, in that case
a Gio::UnixSocketAddress
can be passed to this function.
Readable | Writeable | Construct Only
§timeout
The timeout (in seconds) for socket I/O operations (including connecting to a server, and waiting for a reply to an HTTP request).
Although you can change this property at any time, it will
only affect newly-created connections, not currently-open
ones. You can call SessionExt::abort()
after setting this
if you want to ensure that all future connections will have
this timeout value.
Not to be confused with idle-timeout
(which is
the length of time that idle persistent connections will be
kept open).
Readable | Writeable
§tls-database
Sets the gio::TlsDatabase
to use for validating SSL/TLS
certificates.
If no certificate database is set, then the default database will be
used. See Gio::TlsBackend::get_default_database()
.
Readable | Writeable
§tls-interaction
A gio::TlsInteraction
object that will be passed on to any
Gio::TlsConnection
s created by the session.
This can be used to provide client-side certificates, for example.
Readable | Writeable
§user-agent
User-Agent string.
If non-None
, the value to use for the “User-Agent” header
on Message
s sent from this session.
RFC 2616 says: “The User-Agent request-header field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests.”
The User-Agent header contains a list of one or more product tokens, separated by whitespace, with the most significant product token coming first. The tokens must be brief, ASCII, and mostly alphanumeric (although “-”, “_”, and “.” are also allowed), and may optionally include a “/” followed by a version string. You may also put comments, enclosed in parentheses, between or after the tokens.
If you set a user-agent
property that has trailing
whitespace, #SoupSession will append its own product token
(eg, libsoup/2.3.2
) to the end of the
header for you.
Readable | Writeable
§Signals
§request-queued
Emitted when a request is queued on @session.
When sending a request, first request-queued
is emitted, indicating that the session has become aware of
the request.
After a connection is available to send the request various
Message
signals are emitted as the message is
processed. If the message is requeued, it will emit
restarted
, which will then be followed by other
Message
signals when the message is re-sent.
Eventually, the message will emit finished
.
Normally, this signals the completion of message
processing. However, it is possible that the application
will requeue the message from the “finished” handler.
In that case the process will loop back.
Eventually, a message will reach “finished” and not be
requeued. At that point, the session will emit
request-unqueued
to indicate that it is done
with the message.
To sum up: request-queued
and
request-unqueued
are guaranteed to be emitted
exactly once, but finished
(and all of the other
Message
signals) may be invoked multiple times for a given
message.
§request-unqueued
Emitted when a request is removed from @session’s queue, indicating that @session is done with it.
See request-queued
for a detailed description of
the message lifecycle within a session.
§Implements
SessionExt
, [trait@glib::ObjectExt
], SessionExtManual
Implementations§
source§impl Session
impl Session
Trait Implementations§
source§impl HasParamSpec for Session
impl HasParamSpec for Session
source§impl Ord for Session
impl Ord for Session
source§impl<OT: ObjectType> PartialEq<OT> for Session
impl<OT: ObjectType> PartialEq<OT> for Session
source§impl<OT: ObjectType> PartialOrd<OT> for Session
impl<OT: ObjectType> PartialOrd<OT> for Session
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 Session
impl StaticType for Session
source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for Session
Auto Trait Implementations§
impl RefUnwindSafe for Session
impl !Send for Session
impl !Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
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> 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>,
unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>
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>,
unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>
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>,
unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>
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>,
unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>
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>,
unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>
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>,
unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>
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 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<'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<O> SessionExt for O
impl<O> SessionExt for O
source§fn abort(&self)
fn abort(&self)
source§fn add_feature(&self, feature: &impl IsA<SessionFeature>)
fn add_feature(&self, feature: &impl IsA<SessionFeature>)
alias::GLib.Type
to a session. Read moresource§fn add_feature_by_type(&self, feature_type: Type)
fn add_feature_by_type(&self, feature_type: Type)
SessionFeature
, this creates a new feature of that type and
adds it to @self as with add_feature()
. You can use
this when you don’t need to customize the new feature in any way.
Adding multiple features of the same @feature_type is not allowed. Read moresource§fn accept_language(&self) -> Option<GString>
fn accept_language(&self) -> Option<GString>
source§fn accepts_language_auto(&self) -> bool
fn accepts_language_auto(&self) -> bool
source§fn async_result_message(
&self,
result: &impl IsA<AsyncResult>
) -> Option<Message>
fn async_result_message( &self, result: &impl IsA<AsyncResult> ) -> Option<Message>
source§fn feature(&self, feature_type: Type) -> Option<SessionFeature>
fn feature(&self, feature_type: Type) -> Option<SessionFeature>
source§fn feature_for_message(
&self,
feature_type: Type,
msg: &Message
) -> Option<SessionFeature>
fn feature_for_message( &self, feature_type: Type, msg: &Message ) -> Option<SessionFeature>
source§fn idle_timeout(&self) -> u32
fn idle_timeout(&self) -> u32
source§fn local_address(&self) -> Option<InetSocketAddress>
fn local_address(&self) -> Option<InetSocketAddress>
gio::InetSocketAddress
to use for the client side of
connections in @self. Read moresource§fn max_conns(&self) -> u32
fn max_conns(&self) -> u32
source§fn max_conns_per_host(&self) -> u32
fn max_conns_per_host(&self) -> u32
source§fn proxy_resolver(&self) -> Option<ProxyResolver>
fn proxy_resolver(&self) -> Option<ProxyResolver>
gio::ProxyResolver
currently used by @self. Read moresource§fn remote_connectable(&self) -> Option<SocketConnectable>
fn remote_connectable(&self) -> Option<SocketConnectable>
source§fn timeout(&self) -> u32
fn timeout(&self) -> u32
source§fn tls_database(&self) -> Option<TlsDatabase>
fn tls_database(&self) -> Option<TlsDatabase>
gio::TlsDatabase
currently used by @self. Read moresource§fn tls_interaction(&self) -> Option<TlsInteraction>
fn tls_interaction(&self) -> Option<TlsInteraction>
gio::TlsInteraction
currently used by @self. Read moresource§fn user_agent(&self) -> Option<GString>
fn user_agent(&self) -> Option<GString>
source§fn has_feature(&self, feature_type: Type) -> bool
fn has_feature(&self, feature_type: Type) -> bool
SessionFeature
, or else a subtype of
some class managed by another feature, such as Auth
). Read moresource§fn preconnect_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
msg: &Message,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
fn preconnect_async<P: FnOnce(Result<(), Error>) + 'static>( &self, msg: &Message, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P )
fn preconnect_future( &self, msg: &Message, io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
source§fn remove_feature(&self, feature: &impl IsA<SessionFeature>)
fn remove_feature(&self, feature: &impl IsA<SessionFeature>)
source§fn remove_feature_by_type(&self, feature_type: Type)
fn remove_feature_by_type(&self, feature_type: Type)
source§fn send(
&self,
msg: &Message,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<InputStream, Error>
fn send( &self, msg: &Message, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<InputStream, Error>
source§fn send_and_read(
&self,
msg: &Message,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Bytes, Error>
fn send_and_read( &self, msg: &Message, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<Bytes, Error>
source§fn send_and_read_async<P: FnOnce(Result<Bytes, Error>) + 'static>(
&self,
msg: &Message,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
fn send_and_read_async<P: FnOnce(Result<Bytes, Error>) + 'static>( &self, msg: &Message, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P )
fn send_and_read_future( &self, msg: &Message, io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<Bytes, Error>> + 'static>>
source§fn send_and_splice(
&self,
msg: &Message,
out_stream: &impl IsA<OutputStream>,
flags: OutputStreamSpliceFlags,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<isize, Error>
fn send_and_splice( &self, msg: &Message, out_stream: &impl IsA<OutputStream>, flags: OutputStreamSpliceFlags, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<isize, Error>
source§fn send_and_splice_async<P: FnOnce(Result<isize, Error>) + 'static>(
&self,
msg: &Message,
out_stream: &impl IsA<OutputStream>,
flags: OutputStreamSpliceFlags,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
fn send_and_splice_async<P: FnOnce(Result<isize, Error>) + 'static>( &self, msg: &Message, out_stream: &impl IsA<OutputStream>, flags: OutputStreamSpliceFlags, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P )
fn send_and_splice_future( &self, msg: &Message, out_stream: &(impl IsA<OutputStream> + Clone + 'static), flags: OutputStreamSpliceFlags, io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<isize, Error>> + 'static>>
source§fn send_async<P: FnOnce(Result<InputStream, Error>) + 'static>(
&self,
msg: &Message,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
fn send_async<P: FnOnce(Result<InputStream, Error>) + 'static>( &self, msg: &Message, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P )
fn send_future( &self, msg: &Message, io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<InputStream, Error>> + 'static>>
source§fn set_accept_language(&self, accept_language: &str)
fn set_accept_language(&self, accept_language: &str)
source§fn set_accept_language_auto(&self, accept_language_auto: bool)
fn set_accept_language_auto(&self, accept_language_auto: bool)
get_language_names()
. Read moresource§fn set_idle_timeout(&self, timeout: u32)
fn set_idle_timeout(&self, timeout: u32)
source§fn set_proxy_resolver(&self, proxy_resolver: Option<&impl IsA<ProxyResolver>>)
fn set_proxy_resolver(&self, proxy_resolver: Option<&impl IsA<ProxyResolver>>)
gio::ProxyResolver
to be used by @self on new connections. Read moresource§fn set_timeout(&self, timeout: u32)
fn set_timeout(&self, timeout: u32)
source§fn set_tls_database(&self, tls_database: Option<&impl IsA<TlsDatabase>>)
fn set_tls_database(&self, tls_database: Option<&impl IsA<TlsDatabase>>)
GIo::TlsDatabase
to be used by @self on new connections. Read moresource§fn set_tls_interaction(
&self,
tls_interaction: Option<&impl IsA<TlsInteraction>>
)
fn set_tls_interaction( &self, tls_interaction: Option<&impl IsA<TlsInteraction>> )
gio::TlsInteraction
to be used by @self on new connections. Read more