pub struct UsageSite {
pub file: String,
pub line: u32,
pub col: u32,
pub specifier: Option<String>,
pub local_name: Option<String>,
pub member: Option<String>,
pub kind: UsageSiteKind,
pub via: Option<String>,
}Expand description
One use of the dependency in the code.
Fields§
§file: StringThe file, root-relative.
line: u321-based line.
col: u320-based byte column.
specifier: Option<String>The imported name. Absent on file-level kinds.
local_name: Option<String>The local binding that the code uses. Absent on file-level kinds.
member: Option<String>The static member after the imported name, for example withTypes.
kind: UsageSiteKindHow the code uses the dependency at this site. The known values are
call, wrapper_definition, value_alias, non_call_reference,
jsx_element, re_export, nested_wrapper, dynamic_import,
require, side_effect_import and star_re_export. The set is open:
read an unknown kind as an unresolved site.
via: Option<String>The wrapper that the site goes through, as FILE:EXPORT.
Trait Implementations§
impl Eq for UsageSite
impl StructuralPartialEq for UsageSite
Auto Trait Implementations§
impl Freeze for UsageSite
impl RefUnwindSafe for UsageSite
impl Send for UsageSite
impl Sync for UsageSite
impl Unpin for UsageSite
impl UnsafeUnpin for UsageSite
impl UnwindSafe for UsageSite
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.