pub async fn enforce<ARGS: EnforceArgs + Copy>(rvals: ARGS) -> Result<bool, AuthorizationError> {
    let ef = EF.get().unwrap().read().unwrap();
    ef.enforce(rvals)
        .map_err(|e| AuthorizationError::VerifyFailed {
            args: format!("{:?}", &rvals.try_into_vec().unwrap()),
            source: e,
        })
}
/// The authorization verification is passed or not.
/// # Result
/// OK
/// - `true`: success
/// - `false`: failed
///
/// Err
/// - AuthorizationError
///
/// # Examples
/// ```
/// let s = enforce(("alice", "data1", "read"));
/// println!("{}", s);
/// ```
The authorization verification is passed or not.
The authorization verification is passed or not .
pub async fn enforce<ARGS: EnforceArgs + Copy>(rvals: ARGS) -> Result<bool, AuthorizationError> {
    let ef = EF.get().unwrap().read().unwrap();
    ef.enforce(rvals)
        .map_err(|e| AuthorizationError::VerifyFailed {
            args: format!("{:?}", &rvals.try_into_vec().unwrap()),
            source: e,
        })
}
pub async fn enforce < ARGS : EnforceArgs + Copy > ( rvals : ARGS ) -> Result < bool , AuthorizationError > { let ef = EF . get ( ) . unwrap ( ) . read ( ) . unwrap ( ) ; ef . enforce ( rvals ) . map_err ( | e | AuthorizationError :: VerifyFailed { args : format ! ( " " rvals try_into_vec ( ) unwrap ( ) ) , source : e , } ) }
The authorization verification is passed or not.
The authorization verification is passed or not .
rvals
ARGS
rvals
ARGS
result
OK
`true`: success
`false`: failed

Err
AuthorizationError
OK ` true ` : success ` false ` : failed Err AuthorizationError
examples
None