Trait ux::prelude::SocketClientExt[]

pub trait SocketClientExt: 'static {
Show methods pub fn add_application_proxy(&self, protocol: &str);
pub fn connect<P, Q>(
        &self,
        connectable: &P,
        cancellable: Option<&Q>
    ) -> Result<SocketConnection, Error>
    where
        P: IsA<SocketConnectable>,
        Q: IsA<Cancellable>
;
pub fn connect_async<P, Q, R>(
        &self,
        connectable: &P,
        cancellable: Option<&Q>,
        callback: R
    )
    where
        P: IsA<SocketConnectable>,
        Q: IsA<Cancellable>,
        R: 'static + FnOnce(Result<SocketConnection, Error>) + Send
;
pub fn connect_async_future<P>(
        &self,
        connectable: &P
    ) -> Pin<Box<dyn Future<Output = Result<SocketConnection, Error>> + 'static, Global>>
    where
        P: 'static + IsA<SocketConnectable> + Clone
;
pub fn connect_to_host<P>(
        &self,
        host_and_port: &str,
        default_port: u16,
        cancellable: Option<&P>
    ) -> Result<SocketConnection, Error>
    where
        P: IsA<Cancellable>
;
pub fn connect_to_host_async<P, Q>(
        &self,
        host_and_port: &str,
        default_port: u16,
        cancellable: Option<&P>,
        callback: Q
    )
    where
        P: IsA<Cancellable>,
        Q: 'static + FnOnce(Result<SocketConnection, Error>) + Send
;
pub fn connect_to_host_async_future(
        &self,
        host_and_port: &str,
        default_port: u16
    ) -> Pin<Box<dyn Future<Output = Result<SocketConnection, Error>> + 'static, Global>>;
pub fn connect_to_service<P>(
        &self,
        domain: &str,
        service: &str,
        cancellable: Option<&P>
    ) -> Result<SocketConnection, Error>
    where
        P: IsA<Cancellable>
;
pub fn connect_to_service_async<P, Q>(
        &self,
        domain: &str,
        service: &str,
        cancellable: Option<&P>,
        callback: Q
    )
    where
        P: IsA<Cancellable>,
        Q: 'static + FnOnce(Result<SocketConnection, Error>) + Send
;
pub fn connect_to_service_async_future(
        &self,
        domain: &str,
        service: &str
    ) -> Pin<Box<dyn Future<Output = Result<SocketConnection, Error>> + 'static, Global>>;
pub fn connect_to_uri<P>(
        &self,
        uri: &str,
        default_port: u16,
        cancellable: Option<&P>
    ) -> Result<SocketConnection, Error>
    where
        P: IsA<Cancellable>
;
pub fn connect_to_uri_async<P, Q>(
        &self,
        uri: &str,
        default_port: u16,
        cancellable: Option<&P>,
        callback: Q
    )
    where
        P: IsA<Cancellable>,
        Q: 'static + FnOnce(Result<SocketConnection, Error>) + Send
;
pub fn connect_to_uri_async_future(
        &self,
        uri: &str,
        default_port: u16
    ) -> Pin<Box<dyn Future<Output = Result<SocketConnection, Error>> + 'static, Global>>;
pub fn get_enable_proxy(&self) -> bool;
pub fn get_family(&self) -> SocketFamily;
pub fn get_local_address(&self) -> Option<SocketAddress>;
pub fn get_protocol(&self) -> SocketProtocol;
pub fn get_proxy_resolver(&self) -> Option<ProxyResolver>;
pub fn get_socket_type(&self) -> SocketType;
pub fn get_timeout(&self) -> u32;
pub fn get_tls(&self) -> bool;
pub fn get_tls_validation_flags(&self) -> TlsCertificateFlags;
pub fn set_enable_proxy(&self, enable: bool);
pub fn set_family(&self, family: SocketFamily);
pub fn set_local_address<P>(&self, address: Option<&P>)
    where
        P: IsA<SocketAddress>
;
pub fn set_protocol(&self, protocol: SocketProtocol);
pub fn set_proxy_resolver<P>(&self, proxy_resolver: Option<&P>)
    where
        P: IsA<ProxyResolver>
;
pub fn set_socket_type(&self, type_: SocketType);
pub fn set_timeout(&self, timeout: u32);
pub fn set_tls(&self, tls: bool);
pub fn set_tls_validation_flags(&self, flags: TlsCertificateFlags);
pub fn get_property_type(&self) -> SocketType;
pub fn set_property_type(&self, type_: SocketType);
pub fn connect_event<F>(&self, f: F) -> SignalHandlerId
    where
        F: 'static + Fn(&Self, SocketClientEvent, &SocketConnectable, Option<&IOStream>)
;
pub fn connect_property_enable_proxy_notify<F>(
        &self,
        f: F
    ) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_family_notify<F>(&self, f: F) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_local_address_notify<F>(
        &self,
        f: F
    ) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_protocol_notify<F>(&self, f: F) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_proxy_resolver_notify<F>(
        &self,
        f: F
    ) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_timeout_notify<F>(&self, f: F) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_tls_notify<F>(&self, f: F) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_tls_validation_flags_notify<F>(
        &self,
        f: F
    ) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_type_notify<F>(&self, f: F) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
}

Required methods

pub fn add_application_proxy(&self, protocol: &str)

pub fn connect<P, Q>(
    &self,
    connectable: &P,
    cancellable: Option<&Q>
) -> Result<SocketConnection, Error> where
    P: IsA<SocketConnectable>,
    Q: IsA<Cancellable>, 

pub fn connect_async<P, Q, R>(
    &self,
    connectable: &P,
    cancellable: Option<&Q>,
    callback: R
) where
    P: IsA<SocketConnectable>,
    Q: IsA<Cancellable>,
    R: 'static + FnOnce(Result<SocketConnection, Error>) + Send

pub fn connect_async_future<P>(
    &self,
    connectable: &P
) -> Pin<Box<dyn Future<Output = Result<SocketConnection, Error>> + 'static, Global>> where
    P: 'static + IsA<SocketConnectable> + Clone

pub fn connect_to_host<P>(
    &self,
    host_and_port: &str,
    default_port: u16,
    cancellable: Option<&P>
) -> Result<SocketConnection, Error> where
    P: IsA<Cancellable>, 

pub fn connect_to_host_async<P, Q>(
    &self,
    host_and_port: &str,
    default_port: u16,
    cancellable: Option<&P>,
    callback: Q
) where
    P: IsA<Cancellable>,
    Q: 'static + FnOnce(Result<SocketConnection, Error>) + Send

pub fn connect_to_host_async_future(
    &self,
    host_and_port: &str,
    default_port: u16
) -> Pin<Box<dyn Future<Output = Result<SocketConnection, Error>> + 'static, Global>>

pub fn connect_to_service<P>(
    &self,
    domain: &str,
    service: &str,
    cancellable: Option<&P>
) -> Result<SocketConnection, Error> where
    P: IsA<Cancellable>, 

pub fn connect_to_service_async<P, Q>(
    &self,
    domain: &str,
    service: &str,
    cancellable: Option<&P>,
    callback: Q
) where
    P: IsA<Cancellable>,
    Q: 'static + FnOnce(Result<SocketConnection, Error>) + Send

pub fn connect_to_service_async_future(
    &self,
    domain: &str,
    service: &str
) -> Pin<Box<dyn Future<Output = Result<SocketConnection, Error>> + 'static, Global>>

pub fn connect_to_uri<P>(
    &self,
    uri: &str,
    default_port: u16,
    cancellable: Option<&P>
) -> Result<SocketConnection, Error> where
    P: IsA<Cancellable>, 

pub fn connect_to_uri_async<P, Q>(
    &self,
    uri: &str,
    default_port: u16,
    cancellable: Option<&P>,
    callback: Q
) where
    P: IsA<Cancellable>,
    Q: 'static + FnOnce(Result<SocketConnection, Error>) + Send

pub fn connect_to_uri_async_future(
    &self,
    uri: &str,
    default_port: u16
) -> Pin<Box<dyn Future<Output = Result<SocketConnection, Error>> + 'static, Global>>

pub fn get_enable_proxy(&self) -> bool

pub fn get_family(&self) -> SocketFamily

pub fn get_local_address(&self) -> Option<SocketAddress>

pub fn get_protocol(&self) -> SocketProtocol

pub fn get_proxy_resolver(&self) -> Option<ProxyResolver>

pub fn get_socket_type(&self) -> SocketType

pub fn get_timeout(&self) -> u32

pub fn get_tls(&self) -> bool

pub fn get_tls_validation_flags(&self) -> TlsCertificateFlags

pub fn set_enable_proxy(&self, enable: bool)

pub fn set_family(&self, family: SocketFamily)

pub fn set_local_address<P>(&self, address: Option<&P>) where
    P: IsA<SocketAddress>, 

pub fn set_protocol(&self, protocol: SocketProtocol)

pub fn set_proxy_resolver<P>(&self, proxy_resolver: Option<&P>) where
    P: IsA<ProxyResolver>, 

pub fn set_socket_type(&self, type_: SocketType)

pub fn set_timeout(&self, timeout: u32)

pub fn set_tls(&self, tls: bool)

pub fn set_tls_validation_flags(&self, flags: TlsCertificateFlags)

pub fn get_property_type(&self) -> SocketType

pub fn set_property_type(&self, type_: SocketType)

pub fn connect_event<F>(&self, f: F) -> SignalHandlerId where
    F: 'static + Fn(&Self, SocketClientEvent, &SocketConnectable, Option<&IOStream>), 

pub fn connect_property_enable_proxy_notify<F>(&self, f: F) -> SignalHandlerId where
    F: 'static + Fn(&Self), 

pub fn connect_property_family_notify<F>(&self, f: F) -> SignalHandlerId where
    F: 'static + Fn(&Self), 

pub fn connect_property_local_address_notify<F>(&self, f: F) -> SignalHandlerId where
    F: 'static + Fn(&Self), 

pub fn connect_property_protocol_notify<F>(&self, f: F) -> SignalHandlerId where
    F: 'static + Fn(&Self), 

pub fn connect_property_proxy_resolver_notify<F>(&self, f: F) -> SignalHandlerId where
    F: 'static + Fn(&Self), 

pub fn connect_property_timeout_notify<F>(&self, f: F) -> SignalHandlerId where
    F: 'static + Fn(&Self), 

pub fn connect_property_tls_notify<F>(&self, f: F) -> SignalHandlerId where
    F: 'static + Fn(&Self), 

pub fn connect_property_tls_validation_flags_notify<F>(
    &self,
    f: F
) -> SignalHandlerId where
    F: 'static + Fn(&Self), 

pub fn connect_property_type_notify<F>(&self, f: F) -> SignalHandlerId where
    F: 'static + Fn(&Self), 

Loading content...

Implementors

impl<O> SocketClientExt for O where
    O: IsA<SocketClient>, 

Loading content...