pub struct Rule {
pub rule_id: Technique,
pub issue_type: IssueType,
pub validate: fn(&Vec<(ElementRef<'_>, Option<NodeId>)>, &Auditor<'_>) -> RuleValidation,
pub principle: Principle,
pub guideline: Guideline,
pub success_criteria: &'static str,
}Expand description
the rule validation method that should be performed.
Fields§
§rule_id: Techniquethe message id of the rule to point to the locale
issue_type: IssueTypethe type of rule
validate: fn(&Vec<(ElementRef<'_>, Option<NodeId>)>, &Auditor<'_>) -> RuleValidationvalidate a test returns (valid, rule, selectors)
principle: Principlethe principle type
guideline: Guidelinethe guideline to follow
success_criteria: &'static strthe success criteria
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnwindSafe for Rule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more