[−][src]Struct rslint_core::autofix::Fixer
A simple interface for applying changes to source code
Fields
indels: Vec<Indel>
src: Arc<String>
Implementations
impl Fixer
[src]
pub fn new(src: Arc<String>) -> Fixer
[src]
pub fn apply(&self) -> String
[src]
Apply this fixer to its source code
pub fn replace(&mut self, from: impl Span, to: impl ToString) -> &mut Self
[src]
Replace some area in the source code with a string
pub fn replace_with(&mut self, from: impl Span, to: impl Span) -> &mut Self
[src]
Replace some area in the source code with another area in the source code
pub fn insert(&mut self, offset: usize, text: impl ToString) -> &mut Self
[src]
pub fn wrap(&mut self, span: impl Span, wrapping: Wrapping) -> &mut Self
[src]
pub fn wrap_with(
&mut self,
span: impl Span,
left: impl ToString,
right: impl ToString
) -> &mut Self
[src]
&mut self,
span: impl Span,
left: impl ToString,
right: impl ToString
) -> &mut Self
pub fn delete(&mut self, span: impl Span) -> &mut Self
[src]
pub fn cancel_if_has_comments(
&mut self,
node: impl Borrow<SyntaxNode>
) -> &mut Self
[src]
&mut self,
node: impl Borrow<SyntaxNode>
) -> &mut Self
pub fn unwrap(&mut self, node: impl Unwrappable) -> &mut Self
[src]
pub fn insert_before(
&mut self,
span: impl Span,
text: impl ToString
) -> &mut Self
[src]
&mut self,
span: impl Span,
text: impl ToString
) -> &mut Self
pub fn insert_after(
&mut self,
span: impl Span,
text: impl ToString
) -> &mut Self
[src]
&mut self,
span: impl Span,
text: impl ToString
) -> &mut Self
pub fn eat_trailing_whitespace(&mut self, span: impl Span) -> &mut Self
[src]
pub fn eat_leading_whitespace(&mut self, span: impl Span) -> &mut Self
[src]
Trait Implementations
impl Clone for Fixer
[src]
impl Debug for Fixer
[src]
impl Eq for Fixer
[src]
impl Hash for Fixer
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Fixer> for Fixer
[src]
impl StructuralEq for Fixer
[src]
impl StructuralPartialEq for Fixer
[src]
Auto Trait Implementations
impl RefUnwindSafe for Fixer
impl Send for Fixer
impl Sync for Fixer
impl Unpin for Fixer
impl UnwindSafe for Fixer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
fn __clone_box(&self, Private) -> *mut ()
[src]
impl<T> Erasable for T
unsafe fn unerase(this: NonNull<Erased>) -> NonNull<T>
const ACK_1_1_0: bool
fn erase(this: NonNull<Self>) -> NonNull<Erased>
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,