Struct salvo::TlsServer [−][src]
Implementations
impl 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]
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]
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]
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]
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]
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]
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]
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]
Specify the DER-encoded OCSP response.
This function requires the "tls"
feature.
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]
self,
addr: impl Into<SocketAddr>
) -> Result<SocketAddr, Error>
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 Send + Future<Output = ()> + 'static
) -> Result<SocketAddr, Error>
[src]
self,
addr: impl Into<SocketAddr> + 'static,
signal: impl Send + Future<Output = ()> + 'static
) -> Result<SocketAddr, Error>
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,