pub struct Server { /* private fields */ }Implementations§
Source§impl Server
impl Server
pub fn new(router: Router, context: Context) -> Self
Sourcepub fn on_shutdown(self, work: OnShutdown) -> Self
pub fn on_shutdown(self, work: OnShutdown) -> Self
Run something once the listener has stopped and requests have drained.
After the drain rather than before it: a service that deregistered first would still be serving the requests already in flight, and a service that deregistered and then took ten seconds to finish them is exactly the clean shutdown this is for.
pub fn limits(self, limits: Limits) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Server
impl !UnwindSafe for Server
impl Freeze for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnsafeUnpin for Server
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