pub struct ServerBuilder { /* private fields */ }Implementations§
Source§impl ServerBuilder
impl ServerBuilder
pub fn new<A: ToSocketAddrs>(addr: A) -> Result<ServerBuilder>
pub fn route<F>(&mut self, method: Method, path: &str, route_fn: F) -> &mut Self
pub fn thread_count(&mut self, thread_count: usize) -> &mut Self
pub fn stream_setup_hook<F>(&mut self, f: F) -> &mut Self
pub fn pre_routing_hook<F>(&mut self, f: F) -> &mut Selfwhere
F: Fn(&mut Request<'_>, &mut ResponseHandle, &ConnectionMeta) -> PreRoutingAction + Send + Sync + 'static,
pub fn fallback_route<F>(&mut self, f: F) -> &mut Self
pub fn max_request_head_size(&mut self, value: usize) -> &mut Self
pub fn epoll_queue_max_events(&mut self, value: usize) -> &mut Self
pub fn build(self) -> Server<Router<Box<RouteFn>>>
pub fn build_with_router<R>(self, router: R) -> Server<R>where
R: HttpRouter,
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