pub struct Package {
pub id: String,
pub files: FxHashMap<u32, File>,
pub definitions: DenseMap<Symbol, Definition>,
pub unsupported_go_symbols: FxHashMap<EcoString, String>,
pub uninferred_exports: Option<UninferredExports>,
}Fields§
§id: String§files: FxHashMap<u32, File>file ID -> file. Source and declaration files are classified by File::is_d_lis.
definitions: DenseMap<Symbol, Definition>qualified name -> definition
unsupported_go_symbols: FxHashMap<EcoString, String>Go symbol name -> reason Lisette cannot support it, from #[go(skipped, "...")]
uninferred_exports: Option<UninferredExports>Set when an import cycle keeps the package out of inference: nothing registers its files, so its exports are read from syntax.
Implementations§
Source§impl Package
impl Package
pub fn new(id: &str) -> Package
pub fn nominal() -> Package
pub fn is_public(&self, qualified_name: &str) -> bool
pub fn get_file(&self, file_id: u32) -> Option<&File>
pub fn file_ids(&self) -> impl Iterator<Item = u32> + '_
pub fn source_files(&self) -> impl Iterator<Item = &File>
pub fn source_file_entries(&self) -> impl Iterator<Item = (&u32, &File)>
pub fn typedef_files(&self) -> impl Iterator<Item = &File>
pub fn is_typedef(&self, file_id: u32) -> bool
pub fn is_empty_stub(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Forget for Package
impl Freeze for Packagewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<(u32, File)>: Freeze,
PhantomData<(Symbol, Slot)>: Freeze,
PhantomData<(Symbol, Definition)>: Freeze,
PhantomData<(EcoString, String)>: Freeze,
PhantomData<(EcoString, ())>: Freeze,
impl Move for Package
impl RefUnwindSafe for Package
impl Send for Packagewhere
RawVecInner: Send,
RawTable<(u32, File)>: Send,
RawTable<(Symbol, Slot)>: Send,
EcoVec<u8>: Send,
Arc<Box<[Type]>>: Send,
Arc<FunctionType>: Send,
BoxRaw<Type>: Send,
Arc<Spelling>: Send,
BoxRaw<Annotation>: Send,
Arc<HashMap<EcoString, Method, FxBuildHasher>>: Send,
RawTable<(EcoString, usize)>: Send,
BoxRaw<GoTypeRecipe>: Send,
RawTable<(EcoString, String)>: Send,
RawTable<(EcoString, ())>: Send,
impl Sync for Packagewhere
RawVecInner: Sync,
RawTable<(u32, File)>: Sync,
RawTable<(Symbol, Slot)>: Sync,
EcoVec<u8>: Sync,
Arc<Box<[Type]>>: Sync,
Arc<FunctionType>: Sync,
BoxRaw<Type>: Sync,
Arc<Spelling>: Sync,
BoxRaw<Annotation>: Sync,
Arc<HashMap<EcoString, Method, FxBuildHasher>>: Sync,
RawTable<(EcoString, usize)>: Sync,
BoxRaw<GoTypeRecipe>: Sync,
RawTable<(EcoString, String)>: Sync,
RawTable<(EcoString, ())>: Sync,
impl Unpin for Package
impl UnsafeUnpin for Packagewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(u32, File)>: UnsafeUnpin,
PhantomData<(Symbol, Slot)>: UnsafeUnpin,
PhantomData<(Symbol, Definition)>: UnsafeUnpin,
PhantomData<(EcoString, String)>: UnsafeUnpin,
PhantomData<(EcoString, ())>: UnsafeUnpin,
impl UnwindSafe for Packagewhere
RawVecInner: UnwindSafe,
HashMap<u32, File, FxBuildHasher>: UnwindSafe,
HashMap<Symbol, Slot, FxBuildHasher>: UnwindSafe,
NonNull<u8>: UnwindSafe,
Arc<Box<[Type]>>: UnwindSafe,
Arc<FunctionType>: UnwindSafe,
BoxRaw<Type>: UnwindSafe,
Arc<Spelling>: UnwindSafe,
BoxRaw<Annotation>: UnwindSafe,
Arc<HashMap<EcoString, Method, FxBuildHasher>>: UnwindSafe,
HashMap<EcoString, usize, FxBuildHasher>: UnwindSafe,
BoxRaw<GoTypeRecipe>: UnwindSafe,
HashMap<EcoString, String, FxBuildHasher>: UnwindSafe,
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