pub struct Server<F, A, R> { /* private fields */ }Available on crate feature
server and docsrs only.Expand description
Implementations§
Source§impl<F, R> Server<F, LazyTcp, R>
impl<F, R> Server<F, LazyTcp, R>
Sourcepub async fn run(self, addr: impl Into<SocketAddr>)
pub async fn run(self, addr: impl Into<SocketAddr>)
Binds and runs this server.
§Panics
Panics if we are unable to bind to the provided address.
To handle bind failures, bind a listener and call incoming().
Sourcepub async fn bind(
self,
addr: impl Into<SocketAddr>,
) -> Server<F, TcpListener, R>
pub async fn bind( self, addr: impl Into<SocketAddr>, ) -> Server<F, TcpListener, R>
Binds this server.
§Panics
Panics if we are unable to bind to the provided address.
To handle bind failures, bind a listener and call incoming().
Trait Implementations§
Auto Trait Implementations§
impl<F, A, R> Freeze for Server<F, A, R>
impl<F, A, R> RefUnwindSafe for Server<F, A, R>
impl<F, A, R> Send for Server<F, A, R>
impl<F, A, R> Sync for Server<F, A, R>
impl<F, A, R> Unpin for Server<F, A, R>
impl<F, A, R> UnwindSafe for Server<F, A, R>
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