diff --git a/src/conn/opts/mod.rs b/src/conn/opts/mod.rs index 8465090..0a79ae2 100644 --- a/src/conn/opts/mod.rs +++ b/src/conn/opts/mod.rs @@ -44,6 +44,14 @@ pub struct SslOpts { impl SslOpts { /// Sets the client identity. #[cfg(any(feature = "native-tls", feature = "rustls"))] + #[cfg_attr( + docsrs, + doc(cfg(any( + feature = "native-tls", + feature = "rustls-tls", + feature = "rustls-tls-ring" + ))) + )] pub fn with_client_identity(mut self, identity: Option) -> Self { self.client_identity = identity; self @@ -76,6 +84,14 @@ impl SslOpts { } #[cfg(any(feature = "native-tls", feature = "rustls"))] + #[cfg_attr( + docsrs, + doc(cfg(any( + feature = "native-tls", + feature = "rustls-tls", + feature = "rustls-tls-ring" + ))) + )] pub fn client_identity(&self) -> Option<&ClientIdentity> { self.client_identity.as_ref() } @@ -141,13 +157,13 @@ pub(crate) struct InnerOpts { /// TCP keep alive interval between subsequent probe for mysql connection. /// /// Can be defined using `tcp_keepalive_probe_interval_secs` connection url parameter. - #[cfg(any(target_os = "linux", target_os = "macos",))] + #[cfg(any(target_os = "linux", target_os = "macos"))] tcp_keepalive_probe_interval_secs: Option, /// TCP keep alive probe count for mysql connection. /// /// Can be defined using `tcp_keepalive_probe_count` connection url parameter. - #[cfg(any(target_os = "linux", target_os = "macos",))] + #[cfg(any(target_os = "linux", target_os = "macos"))] tcp_keepalive_probe_count: Option, /// TCP_USER_TIMEOUT time for mysql connection. diff --git a/src/error/mod.rs b/src/error/mod.rs index f0896c1..b7cf6f4 100644 --- a/src/error/mod.rs +++ b/src/error/mod.rs @@ -64,6 +64,14 @@ pub enum Error { DriverError(DriverError), UrlError(UrlError), #[cfg(any(feature = "native-tls", feature = "rustls"))] + #[cfg_attr( + docsrs, + doc(cfg(any( + feature = "native-tls", + feature = "rustls-tls", + feature = "rustls-tls-ring" + ))) + )] TlsError(tls::TlsError), FromValueError(Value), FromRowError(Row), diff --git a/src/error/tls/mod.rs b/src/error/tls/mod.rs index b2db169..3ce898f 100644 --- a/src/error/tls/mod.rs +++ b/src/error/tls/mod.rs @@ -1,10 +1,26 @@ #![cfg(any(feature = "native-tls", feature = "rustls"))] -pub mod native_tls_error; -pub mod rustls_error; +mod native_tls_error; +mod rustls_error; #[cfg(feature = "native-tls")] +#[cfg_attr( + docsrs, + doc(cfg(any( + feature = "native-tls", + feature = "rustls-tls", + feature = "rustls-tls-ring" + ))) +)] pub use native_tls_error::TlsError; #[cfg(feature = "rustls")] +#[cfg_attr( + docsrs, + doc(cfg(any( + feature = "native-tls", + feature = "rustls-tls", + feature = "rustls-tls-ring" + ))) +)] pub use rustls_error::TlsError; diff --git a/src/lib.rs b/src/lib.rs index 9b8f99c..066911b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -916,6 +916,14 @@ pub mod binlog { } #[cfg(any(feature = "native-tls", feature = "rustls"))] +#[cfg_attr( + docsrs, + doc(cfg(any( + feature = "native-tls", + feature = "rustls-tls", + feature = "rustls-tls-ring" + ))) +)] #[doc(inline)] pub use crate::conn::opts::ClientIdentity;