pub struct ServiceRuntime<Cfg>(/* private fields */);Implementations§
Source§impl<Cfg: Clone + 'static> ServiceRuntime<Cfg>
impl<Cfg: Clone + 'static> ServiceRuntime<Cfg>
Sourcepub fn service<S>(&self, name: &str, svc: impl IntoService<S, Cfg, Io>) -> &Self
pub fn service<S>(&self, name: &str, svc: impl IntoService<S, Cfg, Io>) -> &Self
Register service.
Name of the service must be registered during configuration stage with
ServiceConfig::bind() or ServiceConfig::listen() methods.
§Panics
Panics if service with specified name is registered already
Sourcepub fn map_cfg<T>(&self, st: T) -> ServiceRuntime<T>where
T: Clone + 'static,
pub fn map_cfg<T>(&self, st: T) -> ServiceRuntime<T>where
T: Clone + 'static,
Map server configuration.
Trait Implementations§
Auto Trait Implementations§
impl<Cfg> !RefUnwindSafe for ServiceRuntime<Cfg>
impl<Cfg> !Send for ServiceRuntime<Cfg>
impl<Cfg> !Sync for ServiceRuntime<Cfg>
impl<Cfg> !UnwindSafe for ServiceRuntime<Cfg>
impl<Cfg> Freeze for ServiceRuntime<Cfg>where
Cfg: Freeze,
impl<Cfg> Unpin for ServiceRuntime<Cfg>where
Cfg: Unpin,
impl<Cfg> UnsafeUnpin for ServiceRuntime<Cfg>where
Cfg: UnsafeUnpin,
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