Struct ntex_server::net::ServiceConfig
source · pub struct ServiceConfig(/* private fields */);
Implementations§
source§impl ServiceConfig
impl ServiceConfig
sourcepub fn bind<U, N: AsRef<str>>(&self, name: N, addr: U) -> Result<&Self>where
U: ToSocketAddrs,
pub fn bind<U, N: AsRef<str>>(&self, name: N, addr: U) -> Result<&Self>where
U: ToSocketAddrs,
Add new service to the server.
sourcepub fn listen<N: AsRef<str>>(&self, name: N, lst: TcpListener) -> &Self
pub fn listen<N: AsRef<str>>(&self, name: N, lst: TcpListener) -> &Self
Add new service to the server.
sourcepub fn set_tag<N: AsRef<str>>(&self, name: N, tag: &'static str) -> &Self
pub fn set_tag<N: AsRef<str>>(&self, name: N, tag: &'static str) -> &Self
Set io tag for configured service.
sourcepub fn on_worker_start<F, R, E>(&self, f: F) -> &Self
pub fn on_worker_start<F, R, E>(&self, f: F) -> &Self
Register async service configuration function.
This function get called during worker runtime configuration stage. It get executed in the worker thread.
Trait Implementations§
source§impl Clone for ServiceConfig
impl Clone for ServiceConfig
source§fn clone(&self) -> ServiceConfig
fn clone(&self) -> ServiceConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)