pub struct Chunk {
pub module_path: Vec<String>,
pub entities: Vec<Entity>,
pub imports: Vec<ImportStmt>,
pub dependencies: Vec<String>,
pub file_paths: Vec<PathBuf>,
pub entity_sources: Vec<PathBuf>,
}Expand description
AST 感知的数据块,用于 LLM 生成
每个 Chunk 代表一个生成单元——可以是一个模块或单个文件。
Fields§
§module_path: Vec<String>模块路径(如 [“crate”, “generate”, “llm”])
entities: Vec<Entity>块中的实体列表
imports: Vec<ImportStmt>块的导入语句
dependencies: Vec<String>依赖的其他模块名
file_paths: Vec<PathBuf>关联的源文件路径
entity_sources: Vec<PathBuf>每个实体所属的源文件(与 entities 平行;空表示未记录, 供增量场景按实体级过滤摘要生成——演进计划 T2.3)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Chunk
impl RefUnwindSafe for Chunk
impl Send for Chunk
impl Sync for Chunk
impl Unpin for Chunk
impl UnsafeUnpin for Chunk
impl UnwindSafe for Chunk
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,
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