pub struct Config { /* private fields */ }
Expand description
Server configuration
Implementations§
Source§impl Config
impl Config
Sourcepub fn max_clients(self, val: usize) -> Self
pub fn max_clients(self, val: usize) -> Self
set maximum number of clients
Sourcepub fn client_buf_size(self, val: usize) -> Self
pub fn client_buf_size(self, val: usize) -> Self
Set the initial per-client buffer size, will grow beyond this limit if required.
Sourcepub fn handle_fn_blocks(self) -> Self
pub fn handle_fn_blocks(self) -> Self
Indicate that the handle fn might block and should be spawned on a tokio worker thread. This should be used if the fn does heavy computation, or has any blocking i/o in it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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