pub struct ServerBuilder { /* private fields */ }Expand description
Server builder for configuring runtime.
Implementations§
Source§impl ServerBuilder
impl ServerBuilder
pub fn with_config(self, cfg: ServerConfig) -> Self
pub fn with_graceful_shutdown<F>(self, fut: F) -> Self
pub fn with_connection_extensions<F>(self, factory: F) -> Self
pub async fn serve<State>(self, app: Router<State>) -> Result<()>
pub async fn serve_with_listener<State>( self, listener: TcpListener, app: Router<State>, ) -> Result<()>
Auto Trait Implementations§
impl Freeze for ServerBuilder
impl !RefUnwindSafe for ServerBuilder
impl Send for ServerBuilder
impl !Sync for ServerBuilder
impl Unpin for ServerBuilder
impl !UnwindSafe for ServerBuilder
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