diff --git a/src/client.rs b/src/client.rs index 2d11b48f..e86ece67 100644 --- a/src/client.rs +++ b/src/client.rs @@ -38,8 +38,11 @@ pub mod tls { } impl Context { - /// Try to construct a new `Context`, providing the domain the client will - /// connect to. + /// Try to construct a new `Context`. + /// + /// The provided domain will be used for both + /// [SNI](https://en.wikipedia.org/wiki/Server_Name_Indication) and certificate hostname + /// validation. pub fn new>(domain: S) -> Result { Ok(Context { domain: domain.into(), @@ -48,6 +51,10 @@ pub mod tls { } /// Construct a new `Context` using the provided domain and `TlsConnector` + /// + /// The domain will be used for both + /// [SNI](https://en.wikipedia.org/wiki/Server_Name_Indication) and certificate hostname + /// validation. pub fn from_connector>(domain: S, tls_connector: TlsConnector) -> Self { Context { domain: domain.into(),