pub trait SocketConnectionExt: 'static {
// Required methods
fn connect(
&self,
address: &impl IsA<SocketAddress>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>;
fn connect_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
address: &impl IsA<SocketAddress>,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn connect_future(
&self,
address: &impl IsA<SocketAddress> + Clone + 'static
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>;
fn local_address(&self) -> Result<SocketAddress, Error>;
fn remote_address(&self) -> Result<SocketAddress, Error>;
fn socket(&self) -> Socket;
fn is_connected(&self) -> bool;
}