pub fn check<F, Args>(route: Route, builder: Builder, handler: F) -> Route
where
    F: Handler<Args>,
    Args: FromRequest + 'static,
    F::Output: Responder,
{
    let new_perms = Arc::new(builder.permissions.to_vec());
    route.service(fn_factory(move || {
        let new_perms_c = new_perms.clone();
        let handler = handler.clone();
        ready(Ok(PermissionService::new(new_perms_c, handler)))
    }))
}
/// Creates a route which:
/// - intercepts requests and validates inputs
/// - if permission checks are all true, passes through to handler
Creates a route which:
intercepts requests and validates inputs
if permission checks are all true, passes through to handler
Creates a route which : intercepts requests and validates inputs if permission checks are all true passes through to handler
pub fn check<F, Args>(route: Route, builder: Builder, handler: F) -> Route
where
    F: Handler<Args>,
    Args: FromRequest + 'static,
    F::Output: Responder,
{
    let new_perms = Arc::new(builder.permissions.to_vec());
    route.service(fn_factory(move || {
        let new_perms_c = new_perms.clone();
        let handler = handler.clone();
        ready(Ok(PermissionService::new(new_perms_c, handler)))
    }))
}
pub fn check < F , Args > ( route : Route , builder : Builder , handler : F ) -> Route where F : Handler < Args > , Args : FromRequest + ' static , F :: Output : Responder , { let new_perms = Arc :: new ( builder . permissions . to_vec ( ) ) ; route . service ( fn_factory ( move | | { let new_perms_c = new_perms . clone ( ) ; let handler = handler . clone ( ) ; ready ( Ok ( PermissionService :: new ( new_perms_c , handler ) ) ) } ) ) }
Creates a route which:
 intercepts requests and validates inputs
 if permission checks are all true, passes through to handler
Creates a route which : intercepts requests and validates inputs if permission checks are all true passes through to handler
route
Route
builder
Builder
handler
F