[−][src]Struct warp::TlsServer
A Warp Server ready to filter requests over TLS.
This type requires the "tls"
feature.
Implementations
impl<F> TlsServer<F> where
F: Filter + Clone + Send + Sync + 'static,
<F::Future as TryFuture>::Ok: Reply,
<F::Future as TryFuture>::Error: IsReject,
[src]
F: Filter + Clone + Send + Sync + 'static,
<F::Future as TryFuture>::Ok: Reply,
<F::Future as TryFuture>::Error: IsReject,
pub fn key_path(self, path: impl AsRef<Path>) -> Self
[src]
Specify the file path to read the private key.
pub fn cert_path(self, path: impl AsRef<Path>) -> Self
[src]
Specify the file path to read the certificate.
pub fn key(self, key: impl AsRef<[u8]>) -> Self
[src]
Specify the in-memory contents of the private key.
pub fn cert(self, cert: impl AsRef<[u8]>) -> Self
[src]
Specify the in-memory contents of the certificate.
pub async fn run(self, addr: impl Into<SocketAddr> + 'static)
[src]
Run this TlsServer
forever on the current thread.
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 fn bind_ephemeral(
self,
addr: impl Into<SocketAddr> + 'static
) -> (SocketAddr, impl Future<Output = ()> + 'static)
[src]
self,
addr: impl Into<SocketAddr> + 'static
) -> (SocketAddr, impl Future<Output = ()> + 'static)
Bind to a possibly ephemeral socket address.
Returns the bound address and a Future
that can be executed on
any runtime.
This function requires the "tls"
feature.
pub fn bind_with_graceful_shutdown(
self,
addr: impl Into<SocketAddr> + 'static,
signal: impl Future<Output = ()> + Send + 'static
) -> (SocketAddr, impl Future<Output = ()> + 'static)
[src]
self,
addr: impl Into<SocketAddr> + 'static,
signal: impl Future<Output = ()> + Send + 'static
) -> (SocketAddr, impl Future<Output = ()> + 'static)
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.
Trait Implementations
Auto Trait Implementations
impl<F> !RefUnwindSafe for TlsServer<F>
impl<F> Send for TlsServer<F> where
F: Send,
F: Send,
impl<F> Sync for TlsServer<F> where
F: Sync,
F: Sync,
impl<F> Unpin for TlsServer<F> where
F: Unpin,
F: Unpin,
impl<F> !UnwindSafe for TlsServer<F>
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[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.
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.
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>,