pub struct Server { /* private fields */ }Implementations§
Source§impl Server
impl Server
pub fn new() -> Self
pub async fn host(&self, host: &'static str) -> &Self
pub async fn port(&self, port: usize) -> &Self
pub async fn log_dir(&self, log_dir: &'static str) -> &Self
pub async fn log_size(&self, log_size: usize) -> &Self
pub async fn enable_log(&self) -> &Self
pub async fn disable_log(&self) -> &Self
pub async fn http_line_buffer_size(&self, buffer_size: usize) -> &Self
pub async fn websocket_buffer_size(&self, buffer_size: usize) -> &Self
pub async fn inner_print(&self, print: bool) -> &Self
pub async fn inner_log(&self, print: bool) -> &Self
pub async fn enable_inner_print(&self) -> &Self
pub async fn disable_inner_print(&self) -> &Self
pub async fn enable_inner_log(&self) -> &Self
pub async fn disable_inner_log(&self) -> &Self
pub async fn set_nodelay(&self, nodelay: bool) -> &Self
pub async fn enable_nodelay(&self) -> &Self
pub async fn disable_nodelay(&self) -> &Self
pub async fn set_linger(&self, linger: Option<Duration>) -> &Self
pub async fn enable_linger(&self, linger: Duration) -> &Self
pub async fn disable_linger(&self) -> &Self
pub async fn set_ttl(&self, ttl: u32) -> &Self
pub async fn route<R, F, Fut>(&self, route: R, func: F) -> &Self
pub async fn request_middleware<F, Fut>(&self, func: F) -> &Self
pub async fn response_middleware<F, Fut>(&self, func: F) -> &Self
pub async fn listen(&self) -> ServerResult
Source§impl Server
impl Server
pub fn get_mut_config(&mut self) -> &mut ArcRwLock<ServerConfig<'static>>
pub fn get_mut_route( &mut self, ) -> &mut ArcRwLock<HashMap<String, Arc<dyn Func>, BuildHasherDefault<XxHash3_64>>>
pub fn get_mut_route_matcher(&mut self) -> &mut ArcRwLock<RouteMatcher>
pub fn get_mut_request_middleware( &mut self, ) -> &mut ArcRwLock<Vec<Arc<dyn Func>>>
pub fn get_mut_response_middleware( &mut self, ) -> &mut ArcRwLock<Vec<Arc<dyn Func>>>
pub fn get_mut_tmp(&mut self) -> &mut ArcRwLock<Tmp>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Server
impl !RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl !UnwindSafe 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