Struct salvo::TlsServer [−][src]
pub struct TlsServer { /* fields omitted */ }
Implementations
impl TlsServer
[src]
impl TlsServer
[src]pub fn key_path(self, path: impl AsRef<Path>) -> TlsServer
[src]
pub fn key_path(self, path: impl AsRef<Path>) -> TlsServer
[src]Specify the file path to read the private key.
This function requires the "tls"
feature.
pub fn cert_path(self, path: impl AsRef<Path>) -> TlsServer
[src]
pub fn cert_path(self, path: impl AsRef<Path>) -> TlsServer
[src]Specify the file path to read the certificate.
This function requires the "tls"
feature.
pub fn client_auth_optional_path(self, path: impl AsRef<Path>) -> TlsServer
[src]
pub fn client_auth_optional_path(self, path: impl AsRef<Path>) -> TlsServer
[src]Specify the file path to read the trust anchor for optional client authentication.
Anonymous and authenticated clients will be accepted. If no trust anchor is provided by any
of the client_auth_
methods, then client authentication is disabled by default.
This function requires the "tls"
feature.
pub fn client_auth_required_path(self, path: impl AsRef<Path>) -> TlsServer
[src]
pub fn client_auth_required_path(self, path: impl AsRef<Path>) -> TlsServer
[src]Specify the file path to read the trust anchor for required client authentication.
Only authenticated clients will be accepted. If no trust anchor is provided by any of the
client_auth_
methods, then client authentication is disabled by default.
This function requires the "tls"
feature.
pub fn key(self, key: impl AsRef<[u8]>) -> TlsServer
[src]
pub fn key(self, key: impl AsRef<[u8]>) -> TlsServer
[src]Specify the in-memory contents of the private key.
This function requires the "tls"
feature.
pub fn cert(self, cert: impl AsRef<[u8]>) -> TlsServer
[src]
pub fn cert(self, cert: impl AsRef<[u8]>) -> TlsServer
[src]Specify the in-memory contents of the certificate.
This function requires the "tls"
feature.
pub fn client_auth_optional(self, trust_anchor: impl AsRef<[u8]>) -> TlsServer
[src]
pub fn client_auth_optional(self, trust_anchor: impl AsRef<[u8]>) -> TlsServer
[src]Specify the in-memory contents of the trust anchor for optional client authentication.
Anonymous and authenticated clients will be accepted. If no trust anchor is provided by any
of the client_auth_
methods, then client authentication is disabled by default.
This function requires the "tls"
feature.
pub fn client_auth_required(self, trust_anchor: impl AsRef<[u8]>) -> TlsServer
[src]
pub fn client_auth_required(self, trust_anchor: impl AsRef<[u8]>) -> TlsServer
[src]Specify the in-memory contents of the trust anchor for required client authentication.
Only authenticated clients will be accepted. If no trust anchor is provided by any of the
client_auth_
methods, then client authentication is disabled by default.
This function requires the "tls"
feature.
pub fn ocsp_resp(self, resp: impl AsRef<[u8]>) -> TlsServer
[src]
pub fn ocsp_resp(self, resp: impl AsRef<[u8]>) -> TlsServer
[src]Specify the DER-encoded OCSP response.
This function requires the "tls"
feature.
pub fn start(self, addr: impl Into<SocketAddr> + 'static)
[src]
pub fn start_with_threads(
self,
addr: impl Into<SocketAddr> + 'static,
threads: usize
)
[src]
self,
addr: impl Into<SocketAddr> + 'static,
threads: usize
)
pub async fn bind(self, addr: impl Into<SocketAddr> + 'static)
[src]
pub async fn bind(self, addr: impl Into<SocketAddr> + 'static)
[src]Bind to a socket address, returning a Future
that can be
executed on a runtime.
This function requires the "tls"
feature.
pub async fn try_bind(
self,
addr: impl Into<SocketAddr>
) -> Result<SocketAddr, Error>
[src]
pub async fn try_bind(
self,
addr: impl Into<SocketAddr>
) -> Result<SocketAddr, Error>
[src]Bind to a socket address, returning a Future
that can be
executed on any runtime.
In case we are unable to bind to the specified address, resolves to an error and logs the reason.
This function requires the "tls"
feature.
pub async fn try_bind_with_graceful_shutdown(
self,
addr: impl Into<SocketAddr> + 'static,
signal: impl Future<Output = ()> + Send + 'static
) -> Result<SocketAddr, Error>
[src]
pub async fn try_bind_with_graceful_shutdown(
self,
addr: impl Into<SocketAddr> + 'static,
signal: impl Future<Output = ()> + Send + 'static
) -> Result<SocketAddr, Error>
[src]Create a server with graceful shutdown signal.
When the signal completes, the server will start the graceful shutdown process.
This function requires the "tls"
feature.
Auto Trait Implementations
impl !RefUnwindSafe for TlsServer
impl Send for TlsServer
impl Sync for TlsServer
impl Unpin for TlsServer
impl !UnwindSafe for TlsServer
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,