pub enum ServiceLifecycle {
StartPending,
Running,
StopPending,
Stopped,
}Expand description
The SCM status lifecycle bhtune-server reports while running as a Windows service, kept
as a plain enum (rather than directly using windows_service::service::ServiceState,
which only exists on Windows) purely so the expected reporting order is itself
unit-testable on every platform. The Windows-only reporting code maps each variant onto
the real SCM API one-to-one.
Variants§
StartPending
Reported immediately after registering the control handler, while config/logging/the database are still being resolved and the listener has not bound yet.
Running
Reported once crate::run::build_server has returned – the listener is bound and
ready to serve.
StopPending
Reported the instant a Stop/Shutdown control event arrives, before in-flight requests have finished draining.
Stopped
Reported after the server has fully drained and crate::run::serve has returned.
Implementations§
Trait Implementations§
Source§impl Clone for ServiceLifecycle
impl Clone for ServiceLifecycle
Source§fn clone(&self) -> ServiceLifecycle
fn clone(&self) -> ServiceLifecycle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ServiceLifecycle
Source§impl Debug for ServiceLifecycle
impl Debug for ServiceLifecycle
impl Eq for ServiceLifecycle
Source§impl PartialEq for ServiceLifecycle
impl PartialEq for ServiceLifecycle
Source§fn eq(&self, other: &ServiceLifecycle) -> bool
fn eq(&self, other: &ServiceLifecycle) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ServiceLifecycle
Auto Trait Implementations§
impl Freeze for ServiceLifecycle
impl RefUnwindSafe for ServiceLifecycle
impl Send for ServiceLifecycle
impl Sync for ServiceLifecycle
impl Unpin for ServiceLifecycle
impl UnsafeUnpin for ServiceLifecycle
impl UnwindSafe for ServiceLifecycle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].