pub struct FileInsight {
pub path: PathBuf,
pub language: String,
pub entities: Vec<Entity>,
pub imports: Vec<ImportStmt>,
pub doc_comments: Vec<String>,
pub source: String,
}Expand description
解析后的文件洞察,包含所有提取的实体和导入信息
Serialize/Deserialize 供增量管线的解析缓存使用(.state/insights_cache.json): 未变更文件直接反序列化复用,避免重复 tree-sitter 解析。
Fields§
§path: PathBuf§language: String§entities: Vec<Entity>§imports: Vec<ImportStmt>§doc_comments: Vec<String>§source: String文件的源代码文本,用于避免搜索索引构建时重复读盘
Trait Implementations§
Source§impl Clone for FileInsight
impl Clone for FileInsight
Source§fn clone(&self) -> FileInsight
fn clone(&self) -> FileInsight
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 FileInsight
impl Debug for FileInsight
Source§impl<'de> Deserialize<'de> for FileInsight
impl<'de> Deserialize<'de> for FileInsight
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 FileInsight
impl RefUnwindSafe for FileInsight
impl Send for FileInsight
impl Sync for FileInsight
impl Unpin for FileInsight
impl UnsafeUnpin for FileInsight
impl UnwindSafe for FileInsight
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
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<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