| Crates.io | tls-api-stub |
| lib.rs | tls-api-stub |
| version | 0.12.1 |
| created_at | 2017-06-03 08:41:31.702989+00 |
| updated_at | 2024-11-25 15:41:19.75486+00 |
| description | TLS API implementation that returns error on any operation |
| homepage | |
| repository | https://github.com/edgedb/rust-tls-api/ |
| max_upload_size | |
| id | 17452 |
| size | 31,060 |
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);