nu_command/network/tls/
mod.rs

1//! TLS support for networking commands.
2//!
3//! This module is available when the `network` feature is enabled. It requires
4//! either the `native-tls` or `rustls-tls` feature to be selected.
5//!
6//! See [`tls`] for how to get a TLS connector.
7
8#[cfg(feature = "native-tls")]
9#[path = "impl_native_tls.rs"]
10mod impl_tls;
11
12#[cfg(feature = "rustls-tls")]
13#[path = "impl_rustls.rs"]
14mod impl_tls;
15
16#[cfg(all(not(feature = "native-tls"), not(feature = "rustls-tls")))]
17compile_error!(
18    "No TLS backend enabled. Please enable either the `native-tls` or `rustls-tls` feature."
19);
20
21#[cfg(all(feature = "native-tls", feature = "rustls-tls"))]
22compile_error!(
23    "Multiple TLS backends enabled. Please enable only one of `native-tls` or `rustls-tls`, not both."
24);
25
26pub use impl_tls::*;