pub struct ImportedName {
pub kind: ImportedKind,
pub local: Option<String>,
pub is_type: bool,
pub accessed_members: Vec<String>,
pub nested_members: BTreeMap<String, Vec<String>>,
pub escapes: bool,
}Expand description
One binding brought in by an Import.
Fields§
§kind: ImportedKindWhat is imported.
local: Option<String>Local binding name; None for re-exports, side effects and unbound require/import().
is_type: boolimport { type A } or a type-only declaration.
accessed_members: Vec<String>Members read through the local binding in this file (ns.a, Enum.A, const { a } = ns, ns.A in types).
Sorted and deduplicated. Meaningful only when local is set.
nested_members: BTreeMap<String, Vec<String>>Members read one level further down, by the member of ImportedName::accessed_members they are read
through: ns.E.A, ns.E['A'] and the type ns.E.A read A of ns.E. A member has an entry only when every
use of it reads its own members that way; a member without one is used as a whole (ns.E passed around,
typeof ns.E). Each list is sorted and deduplicated. Meaningful only when local is set.
escapes: boolThe binding is used in a way that cannot be reduced to members (passed around, re-exported, computed access,
destructured with a rest element), or the module value is not bound at all (import("x"), bare require("x")).
Trait Implementations§
Source§impl Clone for ImportedName
impl Clone for ImportedName
Source§impl Debug for ImportedName
impl Debug for ImportedName
Source§impl<'de> Deserialize<'de> for ImportedName
impl<'de> Deserialize<'de> for ImportedName
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 ImportedName
Source§impl PartialEq for ImportedName
impl PartialEq for ImportedName
Source§impl Serialize for ImportedName
impl Serialize for ImportedName
impl StructuralPartialEq for ImportedName
Auto Trait Implementations§
impl Forget for ImportedName
impl Freeze for ImportedName
impl Move for ImportedName
impl RefUnwindSafe for ImportedName
impl Send for ImportedName
impl Sync for ImportedName
impl Unpin for ImportedName
impl UnsafeUnpin for ImportedName
impl UnwindSafe for ImportedName
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
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
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> ⓘ
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