tls_api_stub/lib.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
//! 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;
//! ```
#![deny(rustdoc::broken_intra_doc_links)]
pub use acceptor::TlsAcceptor;
pub use acceptor::TlsAcceptorBuilder;
pub use connector::TlsConnector;
pub use connector::TlsConnectorBuilder;
pub use stream::TlsStream;
use tls_api::ImplInfo;
mod stream;
mod acceptor;
mod connector;
#[derive(Debug, thiserror::Error)]
#[error("stub implementation")]
struct Error;
pub(crate) fn info() -> ImplInfo {
ImplInfo {
name: "stub",
version: "none",
}
}