Enum screenlocker::Error

source ·
pub enum Error {
    Win32(Win32ErrorCode),
    UnsupportedPlatform,
    ExeIoError {
        cmd: Option<String>,
        kind: ErrorKind,
        msg: String,
    },
    NonZeroExit {
        cmd: Option<String>,
        exit_code: Option<i32>,
    },
    NoExeFound,
}
Expand description

Error information explaining why the screen couldn’t be locked.

Variants§

§

Win32(Win32ErrorCode)

A Win32 API function reported an error code.

§

UnsupportedPlatform

The current OS platform is not supported (yet) by screenlocker. Please send a pull request or file an issue if you would like to add support!

§

ExeIoError

Fields

§cmd: Option<String>

String path of the command that was to be executed, or None if the command was invalid UTF8.

§kind: ErrorKind

The error kind reported by std::io::Error when trying to run this command.

§msg: String

The error message reported by std::io::Error when trying to run this command.

An error occurred when trying to run a caller specified executable.

§

NonZeroExit

Fields

§cmd: Option<String>

String path of the command that was to be executed, or None if the command was invalid UTF8.

§exit_code: Option<i32>

Exit code returned by the user program after termination. This value is None if the program was terminated by a signal instead of normal termination.

A user specified exe returned a non-zero exit code when executed.

§

NoExeFound

None of the provided screenlocking programs could be found.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.