pub trait SocketConnectionExt: 'static {
fn connect<P: IsA<SocketAddress>, Q: IsA<Cancellable>>(
&self,
address: &P,
cancellable: Option<&Q>
) -> Result<(), Error>;
fn connect_async<P: IsA<SocketAddress>, Q: IsA<Cancellable>, R: FnOnce(Result<(), Error>) + Send + 'static>(
&self,
address: &P,
cancellable: Option<&Q>,
callback: R
);
fn connect_async_future<P: IsA<SocketAddress> + Clone + 'static>(
&self,
address: &P
) -> 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;
}