pub struct AstContext {
pub project: Project,
pub meson_introspection: Option<MesonIntrospection>,
/* private fields */
}Expand description
AST-based project context that replaces the old tree-sitter based ProjectContext
Fields§
§project: Project§meson_introspection: Option<MesonIntrospection>Meson introspection data. None means no meson info was available
Implementations§
Source§impl AstContext
impl AstContext
Sourcepub fn build_with_ignore(
directory: &Path,
ignore_matcher: &GlobSet,
spinner: Option<&ProgressBar>,
meson_introspection: Option<MesonIntrospection>,
) -> Result<Self>
pub fn build_with_ignore( directory: &Path, ignore_matcher: &GlobSet, spinner: Option<&ProgressBar>, meson_introspection: Option<MesonIntrospection>, ) -> Result<Self>
Build with ignore patterns and optional meson introspection
Sourcepub fn update_file(&mut self, file_path: &Path) -> Result<()>
pub fn update_file(&mut self, file_path: &Path) -> Result<()>
Update a single file in the project
Sourcepub fn type_aliases(&self) -> &TypeAliasMap
pub fn type_aliases(&self) -> &TypeAliasMap
Typedef/struct-tag alias map for the whole project.
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 iter_private_files(&self) -> impl Iterator<Item = (&Path, &FileModel)>
pub fn is_public_header(&self, path: &Path) -> Option<bool>
pub fn is_gir_header(&self, path: &Path) -> Option<bool>
pub fn has_public_private_info(&self) -> bool
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>
Auto Trait Implementations§
impl Freeze for AstContext
impl RefUnwindSafe for AstContext
impl Send for AstContext
impl Sync for AstContext
impl Unpin for AstContext
impl UnsafeUnpin for AstContext
impl UnwindSafe for AstContext
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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