pub struct BoundInfo(/* private fields */);Expand description
Immutable snapshot of server state after initialization.
Returned by ServerHandle::info. Contains the bound address, derived URL, and any
values inserted into shared state during Handler::init.
Implementations§
Source§impl BoundInfo
impl BoundInfo
Borrow a type from the TypeSet on this BoundInfo.
Sourcepub fn tcp_socket_addr(&self) -> Option<&SocketAddr>
pub fn tcp_socket_addr(&self) -> Option<&SocketAddr>
Returns the local_addr of a bound tcp listener, if such a thing exists for this server
Sourcepub fn url(&self) -> Option<&Url>
pub fn url(&self) -> Option<&Url>
Returns the URL of this server, derived from the bound address, if available
Sourcepub fn unix_socket_addr(&self) -> Option<&SocketAddr>
pub fn unix_socket_addr(&self) -> Option<&SocketAddr>
Returns the local_addr of a bound unix listener, if such a thing exists for this server
Sourcepub fn context(&self) -> Arc<HttpContext>
pub fn context(&self) -> Arc<HttpContext>
Returns a clone of the underlying HttpContext for this server
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BoundInfo
impl !RefUnwindSafe for BoundInfo
impl Send for BoundInfo
impl Sync for BoundInfo
impl Unpin for BoundInfo
impl UnsafeUnpin for BoundInfo
impl !UnwindSafe for BoundInfo
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