pub struct RuleResult {
pub diagnostics: Vec<Diagnostic>,
pub fixer: Option<Fixer>,
}
Expand description
The result of running a single rule on a syntax tree.
Fields§
§diagnostics: Vec<Diagnostic>
§fixer: Option<Fixer>
Implementations§
Source§impl RuleResult
impl RuleResult
Sourcepub fn new(
diagnostics: Vec<Diagnostic>,
fixer: impl Into<Option<Fixer>>,
) -> Self
pub fn new( diagnostics: Vec<Diagnostic>, fixer: impl Into<Option<Fixer>>, ) -> Self
Make a new rule result with diagnostics and an optional fixer.
Sourcepub fn merge(self, other: RuleResult) -> RuleResult
pub fn merge(self, other: RuleResult) -> RuleResult
Merge two results, this will join self
and other
’s diagnostics and take
self
’s fixer if available or otherwise take other
’s fixer
Trait Implementations§
Source§impl Clone for RuleResult
impl Clone for RuleResult
Source§fn clone(&self) -> RuleResult
fn clone(&self) -> RuleResult
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for RuleResult
impl RefUnwindSafe for RuleResult
impl Send for RuleResult
impl Sync for RuleResult
impl Unpin for RuleResult
impl UnwindSafe for RuleResult
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