pub enum SymbolKind {
Function,
Class,
Method,
Property,
Interface,
TypeAlias,
Enum,
EnumMember,
Variable,
Import,
ReExport,
}Expand description
What a declaration is. The kind drives both the report wording and the confidence penalties: an exported type alias that nothing imports is a safer deletion than a class method that nothing appears to call.
Variants§
Function
Class
Method
Property
A field or property on a class.
Interface
TypeAlias
Enum
EnumMember
Variable
Import
A name bound by an import / from x import y statement.
ReExport
A export * from / export { x } from binding that re-exports
another module’s symbol without declaring anything.
Implementations§
Source§impl SymbolKind
impl SymbolKind
Sourcepub fn is_member(self) -> bool
pub fn is_member(self) -> bool
True for declarations that live inside a class body. Members are only
ever reported when Category::UnusedMember is on,
and they resolve against property accesses rather than bindings.
Sourcepub fn is_type_only(self) -> bool
pub fn is_type_only(self) -> bool
True for declarations that exist only in the type system. A type that is never imported is dead weight, but deleting one can never change runtime behavior, which the confidence model rewards.
Trait Implementations§
Source§impl Clone for SymbolKind
impl Clone for SymbolKind
impl Copy for SymbolKind
Source§impl Debug for SymbolKind
impl Debug for SymbolKind
Source§impl<'de> Deserialize<'de> for SymbolKind
impl<'de> Deserialize<'de> for SymbolKind
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>,
impl Eq for SymbolKind
Source§impl Hash for SymbolKind
impl Hash for SymbolKind
Source§impl PartialEq for SymbolKind
impl PartialEq for SymbolKind
Source§impl Serialize for SymbolKind
impl Serialize for SymbolKind
impl StructuralPartialEq for SymbolKind
Auto Trait Implementations§
impl Freeze for SymbolKind
impl RefUnwindSafe for SymbolKind
impl Send for SymbolKind
impl Sync for SymbolKind
impl Unpin for SymbolKind
impl UnsafeUnpin for SymbolKind
impl UnwindSafe for SymbolKind
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
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<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> ⓘ
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> ⓘ
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