pub struct Server<T: Acceptor> { /* private fields */ }Expand description
The main server struct, responsible for accepting incoming connections and spawning handlers.
Implementations§
Source§impl<T: Acceptor> Server<T>
impl<T: Acceptor> Server<T>
Sourcepub async fn accept_loop(&self, shutdown_rx: Receiver<()>) -> Result<()>
pub async fn accept_loop(&self, shutdown_rx: Receiver<()>) -> Result<()>
Runs the main server loop, accepting new connections.
pub fn local_addr(&self) -> Result<SocketAddr>
Auto Trait Implementations§
impl<T> Freeze for Server<T>
impl<T> RefUnwindSafe for Server<T>where
T: RefUnwindSafe,
impl<T> Send for Server<T>
impl<T> Sync for Server<T>
impl<T> Unpin for Server<T>
impl<T> UnwindSafe for Server<T>where
T: RefUnwindSafe,
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