pub struct Directive<'a> {
pub tool: Tool,
pub verb: Verb,
pub prefix: TextRange,
pub scope: RuleScope,
pub reason: Option<&'a str>,
pub spelling: Spelling,
}Expand description
A recognized directive.
Fields§
§tool: Tool§verb: Verb§prefix: TextRangeThe tool prefix as written — arity-lint, arity-format, arity, or a
deprecated arity-ignore/arity-ignore-file. A rule that rewrites the
spelling replaces exactly these bytes and leaves the rest alone.
scope: RuleScope§reason: Option<&'a str>The text after the :, trimmed. None when there is no :, or nothing
but whitespace follows it.
spelling: SpellingImplementations§
Trait Implementations§
impl<'a> Eq for Directive<'a>
impl<'a> StructuralPartialEq for Directive<'a>
Auto Trait Implementations§
impl<'a> Freeze for Directive<'a>
impl<'a> RefUnwindSafe for Directive<'a>
impl<'a> Send for Directive<'a>
impl<'a> Sync for Directive<'a>
impl<'a> Unpin for Directive<'a>
impl<'a> UnsafeUnpin for Directive<'a>
impl<'a> UnwindSafe for Directive<'a>
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