[−][src]Struct windows_service::service::ServiceStatus
Service status.
This struct wraps the lower level SERVICE_STATUS
providing a few convenience types to fill
in the service status information. However it doesn't fully guard the developer from producing
an invalid ServiceStatus
, therefore please refer to the corresponding MSDN article and in
particular how to fill in the exit_code
, checkpoint
, wait_hint
fields:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms685996(v=vs.85).aspx
Fields
service_type: ServiceType
Type of service.
current_state: ServiceState
Current state of the service.
controls_accepted: ServiceControlAccept
Control commands that service accepts.
exit_code: ServiceExitCode
The error code the service uses to report an error that occurs when it is starting or stopping.
checkpoint: u32
Service initialization progress value that should be increased during a lengthy start, stop, pause or continue operations. For example the service should increment the value as it completes each step of initialization. This value must be zero if the service does not have any pending start, stop, pause or continue operations.
wait_hint: Duration
Estimated time for pending operation.
This basically works as a timeout until the system assumes that the service hung.
This could be either circumvented by updating the ServiceStatus::current_state
or
incrementing a ServiceStatus::checkpoint
value.
Panics
Converting this to the FFI form will panic if the duration is too large to fit as
milliseconds in a DWORD
.
process_id: Option<u32>
Process ID of the service This is only retrieved when querying the service status.
Trait Implementations
impl Clone for ServiceStatus
[src]
fn clone(&self) -> ServiceStatus
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ServiceStatus
[src]
impl Eq for ServiceStatus
[src]
impl Hash for ServiceStatus
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ServiceStatus> for ServiceStatus
[src]
fn eq(&self, other: &ServiceStatus) -> bool
[src]
fn ne(&self, other: &ServiceStatus) -> bool
[src]
impl StructuralEq for ServiceStatus
[src]
impl StructuralPartialEq for ServiceStatus
[src]
Auto Trait Implementations
impl RefUnwindSafe for ServiceStatus
impl Send for ServiceStatus
impl Sync for ServiceStatus
impl Unpin for ServiceStatus
impl UnwindSafe for ServiceStatus
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,