Skip to main content

ScopeExt

Trait ScopeExt 

Source
pub trait ScopeExt {
    // Required methods
    fn scope_engine(&self) -> Result<SharedEngine>;
    fn scope_authorize(
        &self,
        scope: ScopeRef,
        user_id: i64,
        ability: Ability,
        resource: Option<ResourceRef>,
    ) -> impl Future<Output = Result<Capabilities>> + Send;
    fn scope_effective(
        &self,
        scope: ScopeRef,
        user_id: i64,
        resource: Option<ResourceRef>,
    ) -> impl Future<Output = Result<Capabilities>> + Send;
    fn scope_membership(
        &self,
        scope: ScopeRef,
        user_id: i64,
    ) -> impl Future<Output = Result<Membership>> + Send;
}

Required Methods§

Source

fn scope_engine(&self) -> Result<SharedEngine>

Source

fn scope_authorize( &self, scope: ScopeRef, user_id: i64, ability: Ability, resource: Option<ResourceRef>, ) -> impl Future<Output = Result<Capabilities>> + Send

Source

fn scope_effective( &self, scope: ScopeRef, user_id: i64, resource: Option<ResourceRef>, ) -> impl Future<Output = Result<Capabilities>> + Send

Source

fn scope_membership( &self, scope: ScopeRef, user_id: i64, ) -> impl Future<Output = Result<Membership>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ScopeExt for Request

Source§

fn scope_engine(&self) -> Result<SharedEngine>

Source§

async fn scope_authorize( &self, scope: ScopeRef, user_id: i64, ability: Ability, resource: Option<ResourceRef>, ) -> Result<Capabilities>

Source§

async fn scope_effective( &self, scope: ScopeRef, user_id: i64, resource: Option<ResourceRef>, ) -> Result<Capabilities>

Source§

async fn scope_membership( &self, scope: ScopeRef, user_id: i64, ) -> Result<Membership>

Implementors§