[][src]Struct windows_service::service::ServiceFailureActions

pub struct ServiceFailureActions {
    pub reset_period: ServiceFailureResetPeriod,
    pub reboot_msg: Option<OsString>,
    pub command: Option<OsString>,
    pub actions: Option<Vec<ServiceAction>>,
}

A struct that describes the action that should be performed on the system service crash.

Please refer to MSDN for more info:
https://docs.microsoft.com/en-us/windows/win32/api/winsvc/ns-winsvc-_service_failure_actionsw

Fields

reset_period: ServiceFailureResetPeriod

The time after which to reset the failure count to zero if there are no failures, in seconds.

reboot_msg: Option<OsString>

The message to be broadcast to server users before rebooting in response to the SC_ACTION_REBOOT service controller action.

If this value is None, the reboot message is unchanged. If the value is an empty string, the reboot message is deleted and no message is broadcast.

command: Option<OsString>

The command line to execute in response to the SC_ACTION_RUN_COMMAND service controller action. This process runs under the same account as the service.

If this value is None, the command is unchanged. If the value is an empty string, the command is deleted and no program is run when the service fails.

actions: Option<Vec<ServiceAction>>

The array of actions to perform. If this value is None, the ServiceFailureActions::reset_period member is ignored.

Implementations

impl ServiceFailureActions[src]

pub unsafe fn from_raw(
    raw: SERVICE_FAILURE_ACTIONSW
) -> Result<ServiceFailureActions>
[src]

Tries to parse a SERVICE_FAILURE_ACTIONSW into Rust ServiceFailureActions.

Errors

Returns an error if a field inside the SERVICE_FAILURE_ACTIONSW does not have a valid value.

Trait Implementations

impl Clone for ServiceFailureActions[src]

impl Debug for ServiceFailureActions[src]

impl Eq for ServiceFailureActions[src]

impl Hash for ServiceFailureActions[src]

impl PartialEq<ServiceFailureActions> for ServiceFailureActions[src]

impl StructuralEq for ServiceFailureActions[src]

impl StructuralPartialEq for ServiceFailureActions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.