pub struct Bound { /* private fields */ }Available on crate feature
server only.Expand description
A running server
Implementations§
Source§impl Bound
impl Bound
Sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
Returns the bound local address of the server
Sourcepub fn spawn<S, B>(self, service: S, drain: Watch) -> SpawnedServer
pub fn spawn<S, B>(self, service: S, drain: Watch) -> SpawnedServer
Bind an HTTPS server to the configured address with the provided service
The server terminates gracefully when the provided drain handle is signaled.
TLS credentials are read from the configured paths for each connection to support certificate rotation. As such, it is not recommended to expose this server to the open internet or to clients that open many short-lived connections. It is primarily intended for kubernetes admission controllers.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Bound
impl RefUnwindSafe for Bound
impl Send for Bound
impl Sync for Bound
impl Unpin for Bound
impl UnwindSafe for Bound
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more