pub struct Project {
pub files: HashMap<PathBuf, FileModel>,
}Expand description
The complete project model - a map of files to their content
Fields§
§files: HashMap<PathBuf, FileModel>Implementations§
Source§impl Project
impl Project
pub fn new() -> Self
Sourcepub fn resolve_all_gobject_types(&mut self)
pub fn resolve_all_gobject_types(&mut self)
Build a project-wide define map and resolve GObject types across all files. Must be called after all files have been parsed.
Sourcepub fn is_function_declared_in_header(&self, name: &str) -> bool
pub fn is_function_declared_in_header(&self, name: &str) -> bool
Check if a function is declared in any header
pub fn iter_all_files(&self) -> impl Iterator<Item = (&Path, &FileModel)>
pub fn iter_c_files(&self) -> impl Iterator<Item = (&Path, &FileModel)>
pub fn iter_header_files(&self) -> impl Iterator<Item = (&Path, &FileModel)>
pub fn find_func_doc(&self, name: &str) -> Option<&FunctionDoc>
pub fn find_type_doc(&self, type_name: &str) -> Option<&TypeDoc>
pub fn find_gobject_type_by_gtype(&self, gtype: >ype) -> Option<&GObjectType>
Sourcepub fn find_interface_for_property<'a>(
&self,
gobject_type: &'a GObjectType,
property_name: &str,
) -> Option<&'a GType>
pub fn find_interface_for_property<'a>( &self, gobject_type: &'a GObjectType, property_name: &str, ) -> Option<&'a GType>
Given a GObjectType and its overridden property names, find the
implemented interface that defines the most of them. Returns None
if no interface matches any property, or if there’s a tie.
Sourcepub fn is_function_exported(&self, name: &str) -> bool
pub fn is_function_exported(&self, name: &str) -> bool
Check if a function has export macros (truly public API)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Project
impl RefUnwindSafe for Project
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl UnsafeUnpin for Project
impl UnwindSafe for Project
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