pub trait RoleValidator: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn validate(&self, role: &ParsedRole) -> RoleValidationResult;
fn requires_target(&self) -> bool;
fn allows_display_text(&self) -> bool;
// Provided method
fn get_suggestions(&self, role: &ParsedRole) -> Vec<String> { ... }
}Expand description
Trait for implementing role validators
Required Methods§
Sourcefn validate(&self, role: &ParsedRole) -> RoleValidationResult
fn validate(&self, role: &ParsedRole) -> RoleValidationResult
Validates a parsed role
Sourcefn requires_target(&self) -> bool
fn requires_target(&self) -> bool
Returns whether this role requires a target
Sourcefn allows_display_text(&self) -> bool
fn allows_display_text(&self) -> bool
Returns whether this role allows display text
Provided Methods§
Sourcefn get_suggestions(&self, role: &ParsedRole) -> Vec<String>
fn get_suggestions(&self, role: &ParsedRole) -> Vec<String>
Provides suggestions for fixing role issues