#tls #operation

tls-api-stub

TLS API implementation that returns error on any operation

27 releases

0.12.1 Nov 25, 2024
0.9.0 Apr 28, 2022
0.7.0 Oct 26, 2021
0.5.0 Feb 21, 2021
0.1.8 Jun 17, 2017

#361 in Testing

Download history 3585/week @ 2024-12-14 1947/week @ 2024-12-21 2359/week @ 2024-12-28 3733/week @ 2025-01-04 3814/week @ 2025-01-11 3823/week @ 2025-01-18 3793/week @ 2025-01-25 4141/week @ 2025-02-01 4454/week @ 2025-02-08 4067/week @ 2025-02-15 4516/week @ 2025-02-22 4127/week @ 2025-03-01 5551/week @ 2025-03-08 6359/week @ 2025-03-15 5531/week @ 2025-03-22 4523/week @ 2025-03-29

22,802 downloads per month
Used in 22 crates (6 directly)

MIT/Apache

76KB
1.5K SLoC

tls-api-stub

Stub implementation of tls-api. All operations return an error.

Useful when you need an implementation of type like TlsConnector, but you do not intend to use it.

E. g.

fn connect<C : tls_api::TlsConnector>(host: &str, use_tls: bool) { ... }

So if the function is to be used without TLS, it can be called with stub implementation:

connect::<tls_api_stub::TlsConnector>("database", false);

Dependencies

~3–14MB
~190K SLoC