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§
Sourcefn predicate(&self, path: &PolicyPath<'_>) -> bool
fn predicate(&self, path: &PolicyPath<'_>) -> bool
Returns true if the path should be considered for selection.
Sourcefn rank(&self, path1: &PolicyPath<'_>, path2: &PolicyPath<'_>) -> Ordering
fn rank(&self, path1: &PolicyPath<'_>, path2: &PolicyPath<'_>) -> Ordering
Indicates which of two paths is preferred, greater values are preferred.