pub struct Fix { /* private fields */ }Expand description
A collection of Edit elements to be applied to a source file.
Implementations§
Source§impl Fix
impl Fix
Sourcepub fn safe_edits(edit: Edit, rest: impl IntoIterator<Item = Edit>) -> Self
pub fn safe_edits(edit: Edit, rest: impl IntoIterator<Item = Edit>) -> Self
Sourcepub fn unsafe_edit(edit: Edit) -> Self
pub fn unsafe_edit(edit: Edit) -> Self
Sourcepub fn unsafe_edits(edit: Edit, rest: impl IntoIterator<Item = Edit>) -> Self
pub fn unsafe_edits(edit: Edit, rest: impl IntoIterator<Item = Edit>) -> Self
Sourcepub fn display_only_edit(edit: Edit) -> Self
pub fn display_only_edit(edit: Edit) -> Self
Sourcepub fn applicable_edit(edit: Edit, applicability: Applicability) -> Self
pub fn applicable_edit(edit: Edit, applicability: Applicability) -> Self
Create a new Fix with the specified Applicability to apply an Edit element.
Sourcepub fn applicable_edits(
edit: Edit,
rest: impl IntoIterator<Item = Edit>,
applicability: Applicability,
) -> Self
pub fn applicable_edits( edit: Edit, rest: impl IntoIterator<Item = Edit>, applicability: Applicability, ) -> Self
Create a new Fix with the specified Applicability to apply multiple Edit elements.
Sourcepub fn edits(&self) -> &[Edit]
pub fn edits(&self) -> &[Edit]
Return a slice of the Edit elements in the Fix, sorted by Edit::start in ascending order.
pub fn into_edits(self) -> Vec<Edit>
Sourcepub fn applicability(&self) -> Applicability
pub fn applicability(&self) -> Applicability
Return the Applicability of the Fix.
Sourcepub fn isolation(&self) -> IsolationLevel
pub fn isolation(&self) -> IsolationLevel
Return the IsolationLevel of the Fix.
Sourcepub fn isolate(self, isolation: IsolationLevel) -> Self
pub fn isolate(self, isolation: IsolationLevel) -> Self
Create a new Fix with the given IsolationLevel.
Sourcepub fn applies(&self, applicability: Applicability) -> bool
pub fn applies(&self, applicability: Applicability) -> bool
Return true if this Fix should be applied with at a given Applicability.
Sourcepub fn with_applicability(self, applicability: Applicability) -> Self
pub fn with_applicability(self, applicability: Applicability) -> Self
Create a new Fix with the given Applicability.
Trait Implementations§
impl Eq for Fix
Source§impl GetSize for Fix
impl GetSize for Fix
Source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
Source§fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)
fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>( &self, tracker: TRACKER, ) -> (usize, TRACKER)
Determines how many bytes this object occupies inside the heap while using a
tracker. Read moreSource§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
Source§fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
Determines the total size of the object while using a
tracker. Read moreimpl StructuralPartialEq for Fix
Auto Trait Implementations§
impl Freeze for Fix
impl RefUnwindSafe for Fix
impl Send for Fix
impl Sync for Fix
impl Unpin for Fix
impl UnsafeUnpin for Fix
impl UnwindSafe for Fix
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.