Struct actix_server::ServiceConfig
source · pub struct ServiceConfig { /* private fields */ }
Implementations§
source§impl ServiceConfig
impl ServiceConfig
sourcepub fn workers(&mut self, num: usize)
pub fn workers(&mut self, num: usize)
Set number of workers to start.
By default server uses number of available logical cpu as workers count.
sourcepub fn bind<U, N: AsRef<str>>(&mut self, name: N, addr: U) -> Result<&mut Self>where
U: ToSocketAddrs,
pub fn bind<U, N: AsRef<str>>(&mut self, name: N, addr: U) -> Result<&mut Self>where
U: ToSocketAddrs,
Add new service to server
Auto Trait Implementations§
impl Freeze for ServiceConfig
impl !RefUnwindSafe for ServiceConfig
impl Send for ServiceConfig
impl !Sync for ServiceConfig
impl Unpin for ServiceConfig
impl !UnwindSafe for ServiceConfig
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