[][src]Trait actix_web_grants::authorities::AttachAuthorities

pub trait AttachAuthorities {
    pub fn attach(&self, authorities: Vec<String>);
}

Allows you to transfer authorities to actix-web-grants from your custom middleware.

The default implementation is provided for the ServiceRequest

Example

use actix_web_grants::authorities::AttachAuthorities;
use actix_web::dev::ServiceRequest;

fn attach(req: ServiceRequest, authorities: Vec<String>) {
    req.attach(authorities);
}

Required methods

pub fn attach(&self, authorities: Vec<String>)[src]

Loading content...

Implementations on Foreign Types

impl AttachAuthorities for ServiceRequest[src]

Loading content...

Implementors

Loading content...