pub fn to_result(self) -> Result<()> {
        match self {
            Status::Success => Ok(()),
            Status::Error(error) => Err(error),
        }
    }
/// Convert the Status into a Result returning the empty tuple
///
/// # Example
///
/// ```
/// use psa_crypto::types::status::{Status, Error};
///
/// let status_err = Status::Error(Error::GenericError);
/// assert!(status_err.to_result().is_err());
///
/// let status_ok = Status::Success;
/// assert!(status_ok.to_result().is_ok());
/// ```
Convert the Status into a Result returning the empty tuple
Convert the Status into a Result returning the empty tuple
pub fn to_result(self) -> Result<()> {
        match self {
            Status::Success => Ok(()),
            Status::Error(error) => Err(error),
        }
    }
pub fn to_result ( self ) -> Result < ( ) > { match self { Status :: Success => Ok ( ( ) ) , Status :: Error ( error ) => Err ( error ) , } }
Convert the Status into a Result returning the empty tuple
Convert the Status into a Result returning the empty tuple
self
self
example
```
use psa_crypto::types::status::{Status, Error}.

let status_err = Status::Error(Error::GenericError);
assert!(status_err.to_result().is_err()).

let status_ok = Status::Success;
assert!(status_ok.to_result().is_ok());
```
` ` ` use psa_crypto :: types :: status :: { Status Error } . let status_err = Status :: Error ( Error :: GenericError ) ; assert! ( status_err . to_result () . is_err () ) . let status_ok = Status :: Success ; assert! ( status_ok . to_result () . is_ok () ) ; ` ` `