Function easy_connect

Source
pub async fn easy_connect(
    addr: &ServerAddr,
    auth: Option<&AuthenticationMethod>,
    flags: ConnectFlags,
) -> Result<(Connection<ConnectionCompression<ConnectionSecurity<TcpStream>>, ConnectionSecurity<TcpStream>>, Box<ServerInfo>), ConnectError>
Expand description

Connect to a given address with some reasonable presets.

The function is going to establish a TLS 1.3 connection, without the support of the client authorization.

ยงErrors

This returns an error in case the connection fails.