pub struct BoundServer { /* private fields */ }Expand description
A server that has already bound its TCP port but has not yet started accepting connections.
Created by ServerBuilder::listen. Use BoundServer::local_addr to obtain the
actual bound address (useful when binding port 0), then call BoundServer::serve
to start accepting connections.
Implementations§
Source§impl BoundServer
impl BoundServer
Sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
Return the local socket address the server is bound to.
Sourcepub async fn serve(self, router: Router) -> Result<(), OxiHttpError>
pub async fn serve(self, router: Router) -> Result<(), OxiHttpError>
Start accepting connections (same semantics as ServerBuilder::serve).
Auto Trait Implementations§
impl !Freeze for BoundServer
impl !RefUnwindSafe for BoundServer
impl !Sync for BoundServer
impl !UnwindSafe for BoundServer
impl Send for BoundServer
impl Unpin for BoundServer
impl UnsafeUnpin for BoundServer
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