pub fn is_allowed<Actor, Action, Resource>(
        &self,
        actor: Actor,
        action: Action,
        resource: Resource,
    ) -> crate::Result<bool>
    where
        Actor: ToPolar,
        Action: ToPolar,
        Resource: ToPolar,
    {
        let mut query = self.query_rule("allow", (actor, action, resource)).unwrap();
        match query.next() {
            Some(Ok(_)) => Ok(true),
            Some(Err(e)) => Err(e),
            None => Ok(false),
        }
    }
/// High level interface for authorization decisions. Makes an allow query with the given actor, action and resource and returns true or false.
High level interface for authorization decisions. Makes an allow query with the given actor, action and resource and returns true or false.
High level interface for authorization decisions . Makes an allow query with the given actor action and resource and returns true or false .
pub fn is_allowed<Actor, Action, Resource>(
        &self,
        actor: Actor,
        action: Action,
        resource: Resource,
    ) -> crate::Result<bool>
    where
        Actor: ToPolar,
        Action: ToPolar,
        Resource: ToPolar,
    {
        let mut query = self.query_rule("allow", (actor, action, resource)).unwrap();
        match query.next() {
            Some(Ok(_)) => Ok(true),
            Some(Err(e)) => Err(e),
            None => Ok(false),
        }
    }
pub fn is_allowed < Actor , Action , Resource > ( & self , actor : Actor , action : Action , resource : Resource , ) -> crate :: Result < bool > where Actor : ToPolar , Action : ToPolar , Resource : ToPolar , { let mut query = self . query_rule ( " " , ( actor , action , resource ) ) . unwrap ( ) ; match query . next ( ) { Some ( Ok ( _ ) ) => Ok ( true ) , Some ( Err ( e ) ) => Err ( e ) , None => Ok ( false ) , } }
High level interface for authorization decisions.
High level interface for authorization decisions .
&self
actor
Actor
action
Action
resource
Resource