pub type Error = ErrorWith<NoPayload>;
Expand description
Error type for PAM operations without error payload.
This variant never contains a payload.
Aliased Type§
pub struct Error { /* private fields */ }
Implementations§
Source§impl 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§
Source§impl From<ErrorCode> for Error
impl From<ErrorCode> for Error
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);