Skip to main content

PolicyHandler

Trait PolicyHandler 

Source
pub trait PolicyHandler<Cx = RequestContext>:
    Send
    + Sync
    + 'static {
    // Required methods
    fn list_policies<'life0, 'async_trait>(
        &'life0 self,
        request: ListPoliciesRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<ListPoliciesResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_policy<'life0, 'async_trait>(
        &'life0 self,
        request: CreatePolicyRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<PolicyInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_policy<'life0, 'async_trait>(
        &'life0 self,
        request: GetPolicyRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<PolicyInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_policy<'life0, 'async_trait>(
        &'life0 self,
        request: UpdatePolicyRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<PolicyInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_policy<'life0, 'async_trait>(
        &'life0 self,
        request: DeletePolicyRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn list_policies<'life0, 'async_trait>( &'life0 self, request: ListPoliciesRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<ListPoliciesResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List policies

Gets an array of policies defined on the specified securable. There is no guarantee of a specific ordering of the elements in the array.

Source

fn create_policy<'life0, 'async_trait>( &'life0 self, request: CreatePolicyRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<PolicyInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create a new policy

Creates a new row-filter or column-mask policy on the specified securable.

Source

fn get_policy<'life0, 'async_trait>( &'life0 self, request: GetPolicyRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<PolicyInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a policy

Gets the policy that matches the supplied name, defined on the specified securable.

Source

fn update_policy<'life0, 'async_trait>( &'life0 self, request: UpdatePolicyRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<PolicyInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update a policy

Updates the policy that matches the supplied name, defined on the specified securable.

Source

fn delete_policy<'life0, 'async_trait>( &'life0 self, request: DeletePolicyRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete a policy

Deletes the policy that matches the supplied name, defined on the specified securable.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§