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

#1466 in Network programming

Download history 6651/week @ 2024-08-26 5807/week @ 2024-09-02 7197/week @ 2024-09-09 6110/week @ 2024-09-16 4754/week @ 2024-09-23 6895/week @ 2024-09-30 5728/week @ 2024-10-07 6536/week @ 2024-10-14 5124/week @ 2024-10-21 5295/week @ 2024-10-28 5305/week @ 2024-11-04 4882/week @ 2024-11-11 4576/week @ 2024-11-18 3302/week @ 2024-11-25 4483/week @ 2024-12-02 4180/week @ 2024-12-09

16,903 downloads per month
Used in 23 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);

lib.rs:

Stub implementation of TLS API.

All operations return error. No objects can be instantiated.

Can be useful when you need a type parameter of type e. g. TlsConnector:

use tls_api_stub_2::TlsConnector;

let no_connector: Option<TlsConnector> = None;

Dependencies

~2–13MB
~174K SLoC