pub trait Rule: Default {
const NAME: &'static str;
const LEVEL: Level;
// Required methods
fn message(&self, message: &Message) -> String;
fn validate(&self, message: &Message) -> Option<Violation>;
}
Expand description
Rule trait represents a rule that can be applied to a text.
Required Associated Constants§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl Rule for BodyMaxLength
BodyMaxLength represents the body-max-length rule.
impl Rule for BodyMaxLength
BodyMaxLength represents the body-max-length rule.
Source§impl Rule for DescriptionEmpty
DescriptionEmpty represents the description-empty rule.
impl Rule for DescriptionEmpty
DescriptionEmpty represents the description-empty rule.
Source§impl Rule for DescriptionFormat
DescriptionFormat represents the description-format rule.
impl Rule for DescriptionFormat
DescriptionFormat represents the description-format rule.
Source§impl Rule for DescriptionMaxLength
DescriptionMaxLength represents the description-max-length rule.
impl Rule for DescriptionMaxLength
DescriptionMaxLength represents the description-max-length rule.
Source§impl Rule for ScopeEmpty
ScopeEmpty represents the scope-empty rule.
impl Rule for ScopeEmpty
ScopeEmpty represents the scope-empty rule.
Source§impl Rule for ScopeFormat
ScopeFormat represents the scope-format rule.
impl Rule for ScopeFormat
ScopeFormat represents the scope-format rule.
Source§impl Rule for ScopeMaxLength
ScopeMaxLength represents the scope-max-length rule.
impl Rule for ScopeMaxLength
ScopeMaxLength represents the scope-max-length rule.
Source§impl Rule for SubjectEmpty
SubjectEmpty represents the subject-empty rule.
impl Rule for SubjectEmpty
SubjectEmpty represents the subject-empty rule.
Source§impl Rule for TypeFormat
TypeFormat represents the type-format rule.
impl Rule for TypeFormat
TypeFormat represents the type-format rule.