pub struct ServiceConfig<St>(/* private fields */);Implementations§
Source§impl<St> ServiceConfig<St>
impl<St> ServiceConfig<St>
Sourcepub fn bind(
&self,
name: impl AsRef<str>,
addr: impl ToSocketAddrs,
cfg: impl Into<SharedCfg>,
) -> Result<&Self>
pub fn bind( &self, name: impl AsRef<str>, addr: impl ToSocketAddrs, cfg: impl Into<SharedCfg>, ) -> Result<&Self>
Add new service to the server.
Sourcepub fn listen(
&self,
name: impl AsRef<str>,
lst: TcpListener,
cfg: impl Into<SharedCfg>,
) -> &Self
pub fn listen( &self, name: impl AsRef<str>, lst: TcpListener, cfg: impl Into<SharedCfg>, ) -> &Self
Add new service to the server.
Sourcepub fn on_worker_start<F>(&self, f: F) -> &Self
pub fn on_worker_start<F>(&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<St: Clone> Clone for ServiceConfig<St>
impl<St: Clone> Clone for ServiceConfig<St>
Source§fn clone(&self) -> ServiceConfig<St>
fn clone(&self) -> ServiceConfig<St>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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<St> !RefUnwindSafe for ServiceConfig<St>
impl<St> !Send for ServiceConfig<St>
impl<St> !Sync for ServiceConfig<St>
impl<St> !UnwindSafe for ServiceConfig<St>
impl<St> Freeze for ServiceConfig<St>
impl<St> Unpin for ServiceConfig<St>
impl<St> UnsafeUnpin for ServiceConfig<St>
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