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
sourceimpl Error
impl Error
sourcepub fn into_with_payload<T>(self, payload: T) -> ErrorWith<T>
pub fn into_with_payload<T>(self, payload: T) -> ErrorWith<T>
Adds the payload to the error message and returns a corresponding
ErrorWith<T>
instance.
sourcepub fn into<T>(self) -> ErrorWith<T>
pub fn into<T>(self) -> ErrorWith<T>
Converts the error message into a ErrorWith<T>
instance without
a payload.
Trait Implementations
sourceimpl From<ErrorCode> for Error
impl From<ErrorCode> for Error
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);