pub struct Server { /* private fields */ }Implementations§
Source§impl Server
impl Server
pub fn new() -> Self
pub async fn host(&mut self, host: &'static str) -> &mut Self
pub async fn port(&mut self, port: usize) -> &mut Self
pub async fn log_dir(&mut self, log_dir: &'static str) -> &mut Self
pub async fn log_size(&mut self, log_size: usize) -> &mut Self
pub async fn print(&mut self, print: bool) -> &mut Self
pub async fn enable_print(&mut self) -> &mut Self
pub async fn disable_print(&mut self) -> &mut Self
pub async fn open_print(&mut self, print: bool) -> &mut Self
pub async fn log_interval_millis(&mut self, interval_millis: usize) -> &mut Self
pub async fn router<F, Fut>( &mut self, route: &'static str, func: F, ) -> &mut Self
pub async fn middleware<F, Fut>(&mut self, func: F) -> &mut Self
pub async fn judge_enable_keep_alive( arc_lock_controller_data: &ArcRwLockControllerData, ) -> bool
pub async fn listen(&mut self) -> &mut Self
Source§impl Server
impl Server
pub fn get_cfg(&self) -> &ArcRwLock<ServerConfig<'static>>
pub fn get_mut_cfg(&mut self) -> &mut ArcRwLock<ServerConfig<'static>>
pub fn set_cfg(&mut self, val: ArcRwLock<ServerConfig<'static>>) -> &mut Self
pub fn get_router_func( &self, ) -> &ArcRwLock<HashMap<&'static str, Box<dyn Func>>>
pub fn get_mut_router_func( &mut self, ) -> &mut ArcRwLock<HashMap<&'static str, Box<dyn Func>>>
pub fn set_router_func( &mut self, val: ArcRwLock<HashMap<&'static str, Box<dyn Func>>>, ) -> &mut Self
pub fn get_middleware(&self) -> &ArcRwLock<Vec<Box<dyn Func>>>
pub fn get_mut_middleware(&mut self) -> &mut ArcRwLock<Vec<Box<dyn Func>>>
pub fn set_middleware( &mut self, val: ArcRwLock<Vec<Box<dyn Func>>>, ) -> &mut Self
pub fn get_tmp(&self) -> &ArcRwLock<Tmp>
pub fn get_mut_tmp(&mut self) -> &mut ArcRwLock<Tmp>
pub fn set_tmp(&mut self, val: ArcRwLock<Tmp>) -> &mut Self
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