PathPolicy

Trait PathPolicy 

Source
pub trait PathPolicy {
    // Required methods
    fn predicate(&self, path: &PolicyPath<'_>) -> bool;
    fn rank(&self, path1: &PolicyPath<'_>, path2: &PolicyPath<'_>) -> Ordering;
}
Expand description

Path policy trait.

Required Methods§

Source

fn predicate(&self, path: &PolicyPath<'_>) -> bool

Returns true if the path should be considered for selection.

Source

fn rank(&self, path1: &PolicyPath<'_>, path2: &PolicyPath<'_>) -> Ordering

Indicates which of two paths is preferred, greater values are preferred.

Implementors§