Cargo Features
[dependencies]
ytmapi-rs = { version = "0.0.15", default-features = false, features = ["default-tls", "native-tls", "rustls-tls", "simplified-queries", "serde_json"] }
- default = default-tls, simplified-queries
-
These default features are set whenever
ytmapi-rs
is added without
somewhere in the dependency tree.default-features = false - default-tls default
-
Provide alternative TLS options to reqwest's default. NOTE: At least one of the TLS features must be enabled. If multiple are enabled, or another crate enables multiple, the standard builder functions will prefer reqwest's default. For more information, see reqest's documentation. https://docs.rs/reqwest/latest/reqwest/tls/index.html
Enables default-tls of reqwest
To allow alternative TLS options, we need to opt out of a single reqwest feature. This isn't possible in Cargo, so we need to opt back into the other default features. https://github.com/rust-lang/cargo/issues/3126 As of 26/4/24 the following are reqwest default features: http2, default-tls, charset
- native-tls
-
Enables native-tls of reqwest
- rustls-tls
-
Enables rustls-tls of reqwest
- simplified-queries default
-
Enable the use of simplified queries such as YtMusic::search("xx")
Affects
ytmapi-rs::simplified_queries
… - serde_json
-
Enable functions that allow interoperability with the
serde_json
crate. NOTE: serde_json dependency is still required whether or not this feature is enabled, as it is used internally.