Expand description
axum-server-maybetlsacceptor is an axum-server-compatible enum that lets you easily accepts connections with or without TLS. The main goals were:
- no duplication of routes, layers or other serving code to add the acceptor
- no dynamic dispatch
- ability to choose TLS backend (rustls, openssl)
pin-project was chosen instead of pin-project-lite because it does not
play well with other attributes such as cfg.
§Features
By default, no feature is enabled, meaning no TLS backend is available.
rustls: enable the rustls TLS backendopenssl: enable the openssl TLS backend
§Compatibility
Version 0.8.x is compatible with axum-server version 0.8.y.
This crate’s versioning will try to follow axum-server’s major versioning
(or minor while being unstable 0.x.y).
§Usage example
You can find examples in repository.