Struct gio::TlsClientConnection
source · #[repr(transparent)]pub struct TlsClientConnection { /* private fields */ }
Expand description
TlsClientConnection
is the client-side subclass of
TlsConnection
, representing a client-side TLS connection.
Implements
TlsClientConnectionExt
, TlsConnectionExt
, IOStreamExt
, glib::ObjectExt
, TlsConnectionExtManual
, IOStreamExtManual
Implementations§
source§impl TlsClientConnection
impl TlsClientConnection
pub const NONE: Option<&'static TlsClientConnection> = None
sourcepub fn new(
base_io_stream: &impl IsA<IOStream>,
server_identity: Option<&impl IsA<SocketConnectable>>
) -> Result<TlsClientConnection, Error>
pub fn new( base_io_stream: &impl IsA<IOStream>, server_identity: Option<&impl IsA<SocketConnectable>> ) -> Result<TlsClientConnection, Error>
Creates a new TlsClientConnection
wrapping base_io_stream
(which
must have pollable input and output streams) which is assumed to
communicate with the server identified by server_identity
.
See the documentation for property::TlsConnection::base-io-stream
for restrictions
on when application code can run operations on the base_io_stream
after
this function has returned.
base_io_stream
the IOStream
to wrap
server_identity
the expected identity of the server
Returns
the new
TlsClientConnection
, or None
on error
Trait Implementations§
source§impl Clone for TlsClientConnection
impl Clone for TlsClientConnection
source§impl Debug for TlsClientConnection
impl Debug for TlsClientConnection
source§impl Display for TlsClientConnection
impl Display for TlsClientConnection
source§impl Hash for TlsClientConnection
impl Hash for TlsClientConnection
source§impl Ord for TlsClientConnection
impl Ord for TlsClientConnection
source§impl<OT: ObjectType> PartialEq<OT> for TlsClientConnection
impl<OT: ObjectType> PartialEq<OT> for TlsClientConnection
source§impl<OT: ObjectType> PartialOrd<OT> for TlsClientConnection
impl<OT: ObjectType> PartialOrd<OT> for TlsClientConnection
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for TlsClientConnection
impl StaticType for TlsClientConnection
source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.impl Eq for TlsClientConnection
impl IsA<IOStream> for TlsClientConnection
impl IsA<TlsConnection> for TlsClientConnection
Auto Trait Implementations§
impl RefUnwindSafe for TlsClientConnection
impl !Send for TlsClientConnection
impl !Sync for TlsClientConnection
impl Unpin for TlsClientConnection
impl UnwindSafe for TlsClientConnection
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> 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>,
Upcasts an object to a superclass or interface
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>,
Upcasts an object to a reference of its superclass or interface
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>,
Tries to downcast to a subclass or interface implementor
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>,
Tries to downcast to a reference of its subclass or interface implementor
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,
Tries to cast to an object of type
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§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where T: ObjectType,
Tries to cast to reference to an object of type
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,
Casts to
T
unconditionally. Read moresource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere T: ObjectType,
Casts to
&T
unconditionally. Read moresource§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<O> IOStreamExt for Owhere
O: IsA<IOStream>,
impl<O> IOStreamExt for Owhere O: IsA<IOStream>,
source§fn clear_pending(&self)
fn clear_pending(&self)
Clears the pending flag on
self
.source§fn close(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
fn close( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(), Error>
Closes the stream, releasing resources related to it. This will also
close the individual input and output streams, if they are not already
closed. Read more
source§fn close_async<P>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)where
P: FnOnce(Result<(), Error>) + 'static,
fn close_async<P>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P )where P: FnOnce(Result<(), Error>) + 'static,
Requests an asynchronous close of the stream, releasing resources
related to it. When the operation is finished
callback
will be
called. You can then call g_io_stream_close_finish()
to get
the result of the operation. Read morefn close_future( &self, io_priority: Priority ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
source§fn input_stream(&self) -> InputStream
fn input_stream(&self) -> InputStream
Gets the input stream for this object. This is used
for reading. Read more
source§fn output_stream(&self) -> OutputStream
fn output_stream(&self) -> OutputStream
Gets the output stream for this object. This is used for
writing. Read more
source§fn has_pending(&self) -> bool
fn has_pending(&self) -> bool
Checks if a stream has pending actions. Read more
fn connect_closed_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
source§impl<O> IOStreamExtManual for Owhere
O: IsA<IOStream>,
impl<O> IOStreamExtManual for Owhere O: IsA<IOStream>,
fn into_async_read_write(self) -> Result<IOStreamAsyncReadWrite<Self>, Self>
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,
Returns
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>
Returns the
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,
Returns the class of the object in the given type
T
. Read moresource§fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where U: IsInterface,
Returns the interface
T
of the object. Read moresource§fn set_property<V>(&self, property_name: &str, value: V)where
V: ToValue,
fn set_property<V>(&self, property_name: &str, value: V)where V: ToValue,
source§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)])
Sets multiple properties of the object at once. Read more
source§fn set_properties_from_value(&self, property_values: &[(&str, Value)])
fn set_properties_from_value(&self, property_values: &[(&str, Value)])
Sets multiple properties of the object at once. Read more
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,
Gets the property
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
Gets the property
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>
Get the type of the property
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>
Get the
ParamSpec
of the property property_name
of this object.source§fn list_properties(&self) -> PtrSlice<ParamSpec>
fn list_properties(&self) -> PtrSlice<ParamSpec>
Return all
ParamSpec
of the properties of this object.source§fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
Freeze all property notifications until the return guard object is dropped. Read more
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,
Set arbitrary data on this object with the given
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,
Return previously set arbitrary data of this object with the given
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,
Retrieve previously set arbitrary data of this object with the given
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,
Set arbitrary data on this object with the given
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,
Return previously set arbitrary data of this object with the given
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,
Retrieve previously set arbitrary data of this object with the given
key
. Read moresource§fn block_signal(&self, handler_id: &SignalHandlerId)
fn block_signal(&self, handler_id: &SignalHandlerId)
Block a given signal handler. Read more
source§fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
Unblock a given signal handler.
source§fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
Stop emission of the currently emitted signal.
source§fn stop_signal_emission_by_name(&self, signal_name: &str)
fn stop_signal_emission_by_name(&self, signal_name: &str)
Stop emission of the currently emitted signal by the (possibly detailed) signal name.
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,
Connect to the signal
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,
Connect to the signal
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,
Connect to the signal
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,
Connect to the signal
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>,
Connect to the signal
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>,
Connect to the signal
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
Connect a closure to the signal
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
Connect a closure to the signal
signal_id
on this object. Read moresource§fn watch_closure(&self, closure: &impl AsRef<Closure>)
fn watch_closure(&self, closure: &impl AsRef<Closure>)
Limits the lifetime of
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,
Emit signal by signal id. Read more
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>
Same as
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,
Emit signal by its name. Read more
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>
Emit signal by its name. Read more
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,
Emit signal by its name with details. Read more
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>
Emit signal by its name with details. Read more
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,
Emit signal by signal id with details. Read more
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>
Emit signal by signal id with details. Read more
source§fn disconnect(&self, handler_id: SignalHandlerId)
fn disconnect(&self, handler_id: SignalHandlerId)
Disconnect a previously connected signal handler.
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,
Connect to the
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,
Connect to the
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),
Connect to the
notify
signal of the object. Read moresource§fn notify(&self, property_name: &str)
fn notify(&self, property_name: &str)
Notify that the given property has changed its value. Read more
source§fn notify_by_pspec(&self, pspec: &ParamSpec)
fn notify_by_pspec(&self, pspec: &ParamSpec)
Notify that the given property has changed its value. Read more
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,
Add a callback to be notified when the Object is disposed.
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,
Add a callback to be notified when the Object is disposed. Read more
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)
Runs the dispose mechanism of the object. Read more
source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere T: StaticType,
source§fn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
source§impl<O> TlsClientConnectionExt for Owhere
O: IsA<TlsClientConnection>,
impl<O> TlsClientConnectionExt for Owhere O: IsA<TlsClientConnection>,
source§fn copy_session_state(&self, source: &impl IsA<TlsClientConnection>)
fn copy_session_state(&self, source: &impl IsA<TlsClientConnection>)
Possibly copies session state from one connection to another, for use
in TLS session resumption. This is not normally needed, but may be
used when the same session needs to be used between different
endpoints, as is required by some protocols, such as FTP over TLS.
source
should have already completed a handshake and, since TLS 1.3,
it should have been used to read data at least once. self
should not
have completed a handshake. Read moresource§fn server_identity(&self) -> Option<SocketConnectable>
fn server_identity(&self) -> Option<SocketConnectable>
Gets
self
’s expected server identity Read moresource§fn validation_flags(&self) -> TlsCertificateFlags
fn validation_flags(&self) -> TlsCertificateFlags
Gets
self
’s validation flags Read moresource§fn set_server_identity(&self, identity: &impl IsA<SocketConnectable>)
fn set_server_identity(&self, identity: &impl IsA<SocketConnectable>)
Sets
self
’s expected server identity, which is used both to tell
servers on virtual hosts which certificate to present, and also
to let self
know what name to look for in the certificate when
performing TlsCertificateFlags::BAD_IDENTITY
validation, if enabled. Read moresource§fn set_validation_flags(&self, flags: TlsCertificateFlags)
fn set_validation_flags(&self, flags: TlsCertificateFlags)
Sets
self
’s validation flags, to override the default set of
checks performed when validating a server certificate. By default,
TlsCertificateFlags::VALIDATE_ALL
is used. Read morefn connect_accepted_cas_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
fn connect_server_identity_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
fn connect_validation_flags_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
source§impl<O> TlsConnectionExt for Owhere
O: IsA<TlsConnection>,
impl<O> TlsConnectionExt for Owhere O: IsA<TlsConnection>,
source§fn emit_accept_certificate(
&self,
peer_cert: &impl IsA<TlsCertificate>,
errors: TlsCertificateFlags
) -> bool
fn emit_accept_certificate( &self, peer_cert: &impl IsA<TlsCertificate>, errors: TlsCertificateFlags ) -> bool
Used by
TlsConnection
implementations to emit the
signal::TlsConnection::accept-certificate
signal. Read moresource§fn certificate(&self) -> Option<TlsCertificate>
fn certificate(&self) -> Option<TlsCertificate>
source§fn ciphersuite_name(&self) -> Option<GString>
fn ciphersuite_name(&self) -> Option<GString>
Available on crate feature
v2_70
only.Returns the name of the current TLS ciphersuite, or
None
if the
connection has not handshaked or has been closed. Beware that the TLS
backend may use any of multiple different naming conventions, because
OpenSSL and GnuTLS have their own ciphersuite naming conventions that
are different from each other and different from the standard, IANA-
registered ciphersuite names. The ciphersuite name is intended to be
displayed to the user for informative purposes only, and parsing it
is not recommended. Read moresource§fn database(&self) -> Option<TlsDatabase>
fn database(&self) -> Option<TlsDatabase>
Gets the certificate database that
self
uses to verify
peer certificates. See set_database()
. Read moresource§fn interaction(&self) -> Option<TlsInteraction>
fn interaction(&self) -> Option<TlsInteraction>
source§fn negotiated_protocol(&self) -> Option<GString>
fn negotiated_protocol(&self) -> Option<GString>
Available on crate feature
v2_60
only.Gets the name of the application-layer protocol negotiated during
the handshake. Read more
source§fn peer_certificate(&self) -> Option<TlsCertificate>
fn peer_certificate(&self) -> Option<TlsCertificate>
Gets
self
’s peer’s certificate after the handshake has completed
or failed. (It is not set during the emission of
signal::TlsConnection::accept-certificate
.) Read moresource§fn peer_certificate_errors(&self) -> TlsCertificateFlags
fn peer_certificate_errors(&self) -> TlsCertificateFlags
Gets the errors associated with validating
self
’s peer’s
certificate, after the handshake has completed or failed. (It is
not set during the emission of signal::TlsConnection::accept-certificate
.) Read moresource§fn protocol_version(&self) -> TlsProtocolVersion
fn protocol_version(&self) -> TlsProtocolVersion
Available on crate feature
v2_70
only.Returns the current TLS protocol version, which may be
TlsProtocolVersion::Unknown
if the connection has not handshaked, or
has been closed, or if the TLS backend has implemented a protocol version
that is not a recognized TlsProtocolVersion
. Read moresource§fn rehandshake_mode(&self) -> TlsRehandshakeMode
fn rehandshake_mode(&self) -> TlsRehandshakeMode
source§fn requires_close_notify(&self) -> bool
fn requires_close_notify(&self) -> bool
Tests whether or not
self
expects a proper TLS close notification
when the connection is closed. See
set_require_close_notify()
for details. Read moresource§fn handshake(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
fn handshake( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(), Error>
Attempts a TLS handshake on
self
. Read moresource§fn handshake_async<P>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)where
P: FnOnce(Result<(), Error>) + 'static,
fn handshake_async<P>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P )where P: FnOnce(Result<(), Error>) + 'static,
fn handshake_future( &self, io_priority: Priority ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
source§fn set_advertised_protocols(&self, protocols: &[&str])
fn set_advertised_protocols(&self, protocols: &[&str])
Available on crate feature
v2_60
only.Sets the list of application-layer protocols to advertise that the
caller is willing to speak on this connection. The
Application-Layer Protocol Negotiation (ALPN) extension will be
used to negotiate a compatible protocol with the peer; use
negotiated_protocol()
to find the negotiated
protocol after the handshake. Specifying None
for the the value
of protocols
will disable ALPN negotiation. Read moresource§fn set_certificate(&self, certificate: &impl IsA<TlsCertificate>)
fn set_certificate(&self, certificate: &impl IsA<TlsCertificate>)
This sets the certificate that
self
will present to its peer
during the TLS handshake. For a TlsServerConnection
, it is
mandatory to set this, and that will normally be done at construct
time. Read moresource§fn set_database(&self, database: Option<&impl IsA<TlsDatabase>>)
fn set_database(&self, database: Option<&impl IsA<TlsDatabase>>)
Sets the certificate database that is used to verify peer certificates.
This is set to the default database by default. See
TlsBackendExt::default_database()
. If set to None
, then
peer certificate validation will always set the
TlsCertificateFlags::UNKNOWN_CA
error (meaning
signal::TlsConnection::accept-certificate
will always be emitted on
client-side connections, unless that bit is not set in
property::TlsClientConnection::validation-flags
). Read moresource§fn set_interaction(&self, interaction: Option<&impl IsA<TlsInteraction>>)
fn set_interaction(&self, interaction: Option<&impl IsA<TlsInteraction>>)
Set the object that will be used to interact with the user. It will be used
for things like prompting the user for passwords. Read more
source§fn set_rehandshake_mode(&self, mode: TlsRehandshakeMode)
fn set_rehandshake_mode(&self, mode: TlsRehandshakeMode)
Since GLib 2.64, changing the rehandshake mode is no longer supported
and will have no effect. With TLS 1.3, rehandshaking has been removed from
the TLS protocol, replaced by separate post-handshake authentication and
rekey operations. Read more
source§fn set_require_close_notify(&self, require_close_notify: bool)
fn set_require_close_notify(&self, require_close_notify: bool)
Sets whether or not
self
expects a proper TLS close notification
before the connection is closed. If this is true
(the default),
then self
will expect to receive a TLS close notification from its
peer before the connection is closed, and will return a
TlsError::Eof
error if the connection is closed without proper
notification (since this may indicate a network error, or
man-in-the-middle attack). Read moresource§fn advertised_protocols(&self) -> Vec<GString, Global>
fn advertised_protocols(&self) -> Vec<GString, Global>
Available on crate feature
v2_60
only.The list of application-layer protocols that the connection
advertises that it is willing to speak. See
set_advertised_protocols()
.source§fn base_io_stream(&self) -> Option<IOStream>
fn base_io_stream(&self) -> Option<IOStream>
The
IOStream
that the connection wraps. The connection holds a reference
to this stream, and may run operations on the stream from other threads
throughout its lifetime. Consequently, after the IOStream
has been
constructed, application code may only run its own operations on this
stream when no IOStream
operations are running.source§fn connect_accept_certificate<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&O, &TlsCertificate, TlsCertificateFlags) -> bool + 'static,
fn connect_accept_certificate<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O, &TlsCertificate, TlsCertificateFlags) -> bool + 'static,
Emitted during the TLS handshake after the peer certificate has
been received. You can examine
peer_cert
’s certification path by
calling TlsCertificateExt::issuer()
on it. Read moresource§fn connect_advertised_protocols_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&O) + 'static,
fn connect_advertised_protocols_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
Available on crate feature
v2_60
only.fn connect_certificate_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
source§fn connect_ciphersuite_name_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&O) + 'static,
fn connect_ciphersuite_name_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
Available on crate feature
v2_70
only.fn connect_database_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
fn connect_interaction_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
source§fn connect_negotiated_protocol_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&O) + 'static,
fn connect_negotiated_protocol_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
Available on crate feature
v2_60
only.fn connect_peer_certificate_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
fn connect_peer_certificate_errors_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
source§fn connect_protocol_version_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&O) + 'static,
fn connect_protocol_version_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
Available on crate feature
v2_70
only.fn connect_rehandshake_mode_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
fn connect_require_close_notify_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&O) + 'static,
source§impl<O> TlsConnectionExtManual for Owhere
O: IsA<TlsConnection>,
impl<O> TlsConnectionExtManual for Owhere O: IsA<TlsConnection>,
source§fn channel_binding_data(
&self,
type_: TlsChannelBindingType
) -> Result<ByteArray, Error>
fn channel_binding_data( &self, type_: TlsChannelBindingType ) -> Result<ByteArray, Error>
Available on crate feature
v2_66
only.