Type Definition pam_client::Error

source · []
pub type Error = ErrorWith<NoPayload>;
Expand description

Error type for PAM operations without error payload.

This variant never contains a payload.

Implementations

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);

Converts to this type from the input type.