Struct pam_client::ErrorWith [−][src]
pub struct ErrorWith<T> { /* fields omitted */ }Expand description
Base error type for PAM operations (possibly with a payload)
Errors originate from the PAM library, PAM modules or helper structs in this crate. Currently no custom instances are supported.
Implementations
Creates a new Error that takes a payload.
Functions that consume a struct can use the payload to transfer back ownership in error cases.
Takes the payload out of the error message.
If a payload exists in this error, it will be moved into the returned
Option. All further calls to payload() and
take_payload() will return None.
Drops any payload off the error message, if one exists.
Maps the error payload to another type
Removes the payload and converts to 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
Automatic wrapping in std::io::Error (if payload type is compatible).
fn main() -> std::result::Result<(), std::io::Error> {
some_succeeding_pam_function()?;
Ok(())
}fn main() -> std::result::Result<(), std::io::Error> {
some_failing_pam_function()?;
Ok(())
}Auto Trait Implementations
impl<T> RefUnwindSafe for ErrorWith<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for ErrorWith<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more