pub struct Removal {
pub start: u32,
pub end: u32,
pub kind: RemovalKind,
pub statement: (u32, u32),
pub siblings: u32,
pub default_expression: bool,
}Expand description
A byte range to delete to fix an unused export.
Fields§
§start: u32Start byte offset.
end: u32End byte offset (exclusive).
kind: RemovalKindWhat the range deletes.
statement: (u32, u32)Byte range of the whole export statement including one trailing line break.
siblings: u32Number of exports declared by that statement (including this one).
default_expression: boolThe statement is export default <expression> (or an anonymous default declaration) and
RemovalKind::Statement deletes the expression too, not only the export. Only an expression whose evaluation
has no effect gets a removal (a literal, an identifier, a function, a class that runs no code, or an array or
object of those); callers that want a conservative fix can still skip or flag these.
Trait Implementations§
impl Copy for Removal
Source§impl<'de> Deserialize<'de> for Removal
impl<'de> Deserialize<'de> for Removal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Removal
impl StructuralPartialEq for Removal
Auto Trait Implementations§
impl Forget for Removal
impl Freeze for Removal
impl Move for Removal
impl RefUnwindSafe for Removal
impl Send for Removal
impl Sync for Removal
impl Unpin for Removal
impl UnsafeUnpin for Removal
impl UnwindSafe for Removal
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more