ServiceErrKind

Enum ServiceErrKind 

Source
pub enum ServiceErrKind {
Show 17 variants ServiceManagementNotAvailable, AlreadyInstalled, NotInstalled, InvalidNameOrPrefix, WrongState(ServiceStatus), Timeout(ServiceStatus), TimeoutError(Box<ServiceErrKind>), BadUtf8, BadExitStatus(Option<i32>, String), ServicePathNotFound, AccessDenied, DirectoryNotFound, BadServiceSpec, IoError, BadSid, PlatformError(Option<i64>), Unknown,
}
Expand description

The error type for service management operations.

Variants§

§

ServiceManagementNotAvailable

Service management is not available on this platform either because it’s not supported or because the service manager is not detected.

§

AlreadyInstalled

The service is already installed.

§

NotInstalled

The service is not installed.

§

InvalidNameOrPrefix

The service name or prefix is invalid.

§

WrongState(ServiceStatus)

The service is in the wrong state for the requested operation.

§

Timeout(ServiceStatus)

The status operation timed out. Last status is returned.

§

TimeoutError(Box<ServiceErrKind>)

The operation timed out. Last error is returned.

§

BadUtf8

The operation failed because an OS string wasn’t valid UTF-8.

§

BadExitStatus(Option<i32>, String)

The operation failed because a child process exited with a non-zero status.

§

ServicePathNotFound

The service path was not found.

§

AccessDenied

The operation failed due to insufficient permissions.

§

DirectoryNotFound

The operation failed because a directory was not found.

§

BadServiceSpec

The operation failed because the service specification is invalid.

§

IoError

The operation failed because of an I/O error.

§

BadSid

The operation failed because the SID could not be extracted.

§

PlatformError(Option<i64>)

The operation failed because of a platform-specific error.

§

Unknown

The operation failed because of an unknown error.

Trait Implementations§

Source§

impl Clone for ServiceErrKind

Source§

fn clone(&self) -> ServiceErrKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ServiceErrKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl UniKind for ServiceErrKind

Source§

fn context(&self, _cause: Option<Cause<'_>>) -> Option<Cow<'static, str>>

Returns additional context for this specific kind, if any. Defaults to None.
Source§

fn value(&self, _cause: Option<Cause<'_>>) -> Cow<'static, str>

The string value of the kind, if any. This is useful for programmatic evaluation when the type is boxed in the error chain and the type is not known. Defaults to "".
Source§

fn code(&self, _cause: Option<Cause<'_>>) -> i32

Returns the code (typically for FFI) for this specific kind. Defaults to -1.
Source§

fn type_name(&self) -> &'static str

Returns the concrete type name.
Source§

fn into_error(self) -> UniError<Self>
where Self: Sized,

Converts the UniKind into a UniError with the same kind.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.