Type Definition pam_client::Error[][src]

pub type Error = ErrorWith<NoPayload>;
Expand description

Error type for PAM operations without error payload.

This variant never contains a payload.

Implementations

Creates a new Error.

Adds the payload to the error message and returns a corresponding ErrorWith<T> instance.

Converts the error message into a ErrorWith<T> instance without a payload.

Trait Implementations

Wrapping of a ErrorCode in a Error without a PAM context.

This is used internally to construct Error instances when no PAM context is available. These instances won’t have a message string, only a code.

Examples:


let error = Error::from(ErrorCode::ABORT);
println!("{:?}", error);

let error: Error = ErrorCode::ABORT.into();
println!("{:?}", error);

Performs the conversion.