pub struct Server { /* private fields */ }Implementations§
Source§impl Server
impl Server
pub fn new() -> Self
pub fn host<T>(&mut self, host: T) -> &mut Self
pub fn port(&mut self, port: usize) -> &mut Self
pub fn thread_pool_size(&mut self, thread_pool_size: usize) -> &mut Self
pub fn log_dir<T>(&mut self, log_dir: T) -> &mut Self
pub fn log_size(&mut self, log_size: usize) -> &mut Self
pub fn buffer(&mut self, buffer_size: usize) -> &mut Self
pub fn func<F>(&mut self, func: F) -> &mut Self
pub fn middleware<F>(&mut self, func: F) -> &mut Self
pub async fn async_func<F, Fut>(&mut self, func: F) -> &mut Self
pub async fn async_middleware<F, Fut>(&mut self, func: F) -> &mut Self
pub fn listen(&mut self) -> &mut Self
Source§impl Server
impl Server
pub fn get_cfg(&self) -> &ArcRwLock<ServerConfig>
pub fn get_mut_cfg(&mut self) -> &mut ArcRwLock<ServerConfig>
pub fn set_cfg(&mut self, val: ArcRwLock<ServerConfig>) -> &mut Self
pub fn get_func(&self) -> &ArcRwLock<Box<dyn Func>>
pub fn get_mut_func(&mut self) -> &mut ArcRwLock<Box<dyn Func>>
pub fn set_func(&mut self, val: ArcRwLock<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_async_func(&self) -> &Arc<RwLock<Box<dyn AsyncFunc>>>
pub fn get_mut_async_func(&mut self) -> &mut Arc<RwLock<Box<dyn AsyncFunc>>>
pub fn set_async_func( &mut self, val: Arc<RwLock<Box<dyn AsyncFunc>>>, ) -> &mut Self
pub fn get_async_middleware(&self) -> &Arc<RwLock<Vec<Box<dyn AsyncFunc>>>>
pub fn get_mut_async_middleware( &mut self, ) -> &mut Arc<RwLock<Vec<Box<dyn AsyncFunc>>>>
pub fn set_async_middleware( &mut self, val: Arc<RwLock<Vec<Box<dyn AsyncFunc>>>>, ) -> &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