pub struct RuntimeServiceComponent<S> { /* private fields */ }Expand description
Component that provides the main runtime service future.
Exactly one runtime service component must be registered. HTTP products
usually expose a small http_component(...) constructor that builds this
value from an Actix Server, its ServerHandle, and the shared shutdown
token.
Implementations§
Source§impl<S> RuntimeServiceComponent<S>
impl<S> RuntimeServiceComponent<S>
Sourcepub fn new<F, Fut>(
component_name: &'static str,
kind: RuntimeComponentKind,
service: S,
shutdown_token: CancellationToken,
stop_on_signal: F,
) -> Self
pub fn new<F, Fut>( component_name: &'static str, kind: RuntimeComponentKind, service: S, shutdown_token: CancellationToken, stop_on_signal: F, ) -> Self
Creates a service component with a product-provided stop hook.
Trait Implementations§
Source§impl<S, Service> AsterRuntimeComponent<S> for RuntimeServiceComponent<Service>
impl<S, Service> AsterRuntimeComponent<S> for RuntimeServiceComponent<Service>
Source§type Output = AsterRuntimeBuilder<Service>
type Output = AsterRuntimeBuilder<Service>
Builder type returned after this component is applied.
Source§fn apply(self, builder: AsterRuntimeBuilder<S>) -> Self::Output
fn apply(self, builder: AsterRuntimeBuilder<S>) -> Self::Output
Applies the component to the runtime builder.
Auto Trait Implementations§
impl<S> Freeze for RuntimeServiceComponent<S>where
S: Freeze,
impl<S> !RefUnwindSafe for RuntimeServiceComponent<S>
impl<S> Send for RuntimeServiceComponent<S>where
S: Send,
impl<S> !Sync for RuntimeServiceComponent<S>
impl<S> Unpin for RuntimeServiceComponent<S>where
S: Unpin,
impl<S> UnsafeUnpin for RuntimeServiceComponent<S>where
S: UnsafeUnpin,
impl<S> !UnwindSafe for RuntimeServiceComponent<S>
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