ResourceMatcher

Trait ResourceMatcher 

Source
pub trait ResourceMatcher {
    type Context;

    // Required method
    fn do_match(
        &self,
        context: &Request<Self::Context>,
        input: &str,
        policy: &str,
    ) -> bool;
}
Expand description

Trait to extend Policy resource matching.

Required Associated Types§

Source

type Context

The type of the context associated with the request.

Required Methods§

Source

fn do_match( &self, context: &Request<Self::Context>, input: &str, policy: &str, ) -> bool

This method is being called by Policy when it tries to match a Request to a resource in the policy rules.

Implementors§