pub struct Server<T, V> { /* private fields */ }Implementations§
Source§impl<T: Acceptor, V: HandshakeValidator + 'static> Server<T, V>
impl<T: Acceptor, V: HandshakeValidator + 'static> Server<T, V>
pub fn new(acceptor: T, validator: V) -> Self
pub async fn accept_loop(&self, shutdown_rx: Receiver<()>) -> Result<()>
pub async fn handle_connection( connection: <T as Acceptor>::Connection, validator: Arc<V>, )
pub fn local_addr(&self) -> Result<SocketAddr>
Auto Trait Implementations§
impl<T, V> Freeze for Server<T, V>
impl<T, V> RefUnwindSafe for Server<T, V>where
T: RefUnwindSafe,
V: RefUnwindSafe,
impl<T, V> Send for Server<T, V>
impl<T, V> Sync for Server<T, V>
impl<T, V> Unpin for Server<T, V>
impl<T, V> UnwindSafe for Server<T, V>where
T: RefUnwindSafe,
V: 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