pub struct ServerBuilder { /* private fields */ }Expand description
HTTP server builder
Implementations§
Source§impl ServerBuilder
impl ServerBuilder
pub fn new() -> Self
pub fn config(self, config: ServerConfig) -> Self
pub fn router(self, router: Router) -> Self
pub fn host(self, host: impl Into<String>) -> Self
pub fn port(self, port: u16) -> Self
pub fn cors_enabled(self, enabled: bool) -> Self
pub fn tracing_enabled(self, enabled: bool) -> Self
pub fn build(self) -> Result<HttpServer>
Trait Implementations§
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