[][src]Struct rslint_core::RuleResult

pub struct RuleResult {
    pub diagnostics: Vec<Diagnostic>,
    pub fixer: Option<Fixer>,

The result of running a single rule on a syntax tree.


diagnostics: Vec<Diagnostic>fixer: Option<Fixer>


impl RuleResult[src]

pub fn new(
    diagnostics: Vec<Diagnostic>,
    fixer: impl Into<Option<Fixer>>
) -> Self

Make a new rule result with diagnostics and an optional fixer.

pub fn outcome(&self) -> Outcome[src]

Get the result of running this rule.

pub fn merge(self, other: RuleResult) -> RuleResult[src]

Merge two results, this will join self and other's diagnostics and take self's fixer if available or otherwise take other's fixer

pub fn fix(&self) -> Option<String>[src]

Attempt to fix the issue if the rule can be autofixed.

Trait Implementations

impl Clone for RuleResult[src]

impl Debug for RuleResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> DynClone for T where
    T: Clone

impl<T> Erasable for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.