pub struct ProjectFile {
pub path: PathBuf,
pub language: Language,
pub content_hash: String,
pub imports: Vec<Import>,
pub exports: Vec<Export>,
pub functions: Vec<Function>,
pub types: Vec<TypeDef>,
pub dependencies_used: Vec<DependencyUsage>,
pub language_ir: LanguageIR,
pub file_doc: Option<String>,
}Expand description
Normalized intermediate representation of a parsed source file.
Common fields are shared across all languages. Language-specific
details live in the language_ir enum variant.
Fields§
§path: PathBuf§language: Language§content_hash: String§imports: Vec<Import>§exports: Vec<Export>§functions: Vec<Function>§types: Vec<TypeDef>§dependencies_used: Vec<DependencyUsage>§language_ir: LanguageIR§file_doc: Option<String>File-level doc comment extracted by the parser.
- Rust:
//!inner doc comment at the top of the file. - Python: module-level docstring (first
"""..."""or'''...'''). - TypeScript/JavaScript: leading
/** ... */or//comment block.
None when no file-level documentation is present or the parser
has not yet been updated to extract it.
Trait Implementations§
Source§impl Clone for ProjectFile
impl Clone for ProjectFile
Source§fn clone(&self) -> ProjectFile
fn clone(&self) -> ProjectFile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProjectFile
impl Debug for ProjectFile
Source§impl<'de> Deserialize<'de> for ProjectFile
impl<'de> Deserialize<'de> for ProjectFile
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProjectFile
impl RefUnwindSafe for ProjectFile
impl Send for ProjectFile
impl Sync for ProjectFile
impl Unpin for ProjectFile
impl UnsafeUnpin for ProjectFile
impl UnwindSafe for ProjectFile
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