pub struct ImportBindingReference {
pub import_index: u32,
pub member_path: Box<str>,
pub kind: ImportBindingReferenceKind,
pub span_start: u32,
pub declared_name: Option<Box<str>>,
pub through: Option<Box<str>>,
}Expand description
A value reference to a runtime ESM import binding that is not an admitted call site, or that initializes a top-level declarator.
The admission rules are the same as for ImportedCallSite: the binding
has one import declaration, it is not type-only, and the reference reads a
value. fallow trace --dependency reads these facts to count each use of
an imported name that it cannot resolve to a call, and to find project
wrappers such as export const useX = useSelector.withTypes().
Fields§
§import_index: u32Index into ModuleInfo.imports of the root binding.
member_path: Box<str>Static member suffix after the root, empty for a bare reference.
kind: ImportBindingReferenceKindHow the code uses the reference.
span_start: u32Start byte of the root identifier, or of the call for
ImportBindingReferenceKind::InitializerCall.
declared_name: Option<Box<str>>Name of the top-level declarator that this reference initializes.
through: Option<Box<str>>The exported top-level declarator that the reference reads, when the
reference names that declarator and not the import binding. The
declarator is initialized by a reference to the import binding at
import_index, so the reference is a use of the binding through a
project wrapper in its own module. None for a direct reference.
Trait Implementations§
Source§impl Clone for ImportBindingReference
impl Clone for ImportBindingReference
Source§impl Debug for ImportBindingReference
impl Debug for ImportBindingReference
impl<'__de> Decode<'__de> for ImportBindingReferencewhere
'__de:,
impl Encode for ImportBindingReference
impl Eq for ImportBindingReference
Source§impl PartialEq for ImportBindingReference
impl PartialEq for ImportBindingReference
impl StructuralPartialEq for ImportBindingReference
Auto Trait Implementations§
impl Freeze for ImportBindingReference
impl RefUnwindSafe for ImportBindingReference
impl Send for ImportBindingReference
impl Sync for ImportBindingReference
impl Unpin for ImportBindingReference
impl UnsafeUnpin for ImportBindingReference
impl UnwindSafe for ImportBindingReference
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> DecodeOwned for Twhere
T: for<'de> Decode<'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
key and return true if they are equal.