pub struct AstChunk {
pub content: String,
pub chunk_type: String,
pub start_line: usize,
pub end_line: usize,
pub start_byte: usize,
pub end_byte: usize,
pub importance_score: f64,
pub estimated_tokens: usize,
pub dependencies: Vec<String>,
pub name: Option<String>,
pub is_public: bool,
pub has_documentation: bool,
}
Expand description
A parsed code chunk with semantic information
Fields§
§content: String
The text content of this chunk
chunk_type: String
Type of the chunk (function, class, import, etc.)
start_line: usize
Start line (1-indexed)
end_line: usize
End line (1-indexed)
start_byte: usize
Start byte offset
end_byte: usize
End byte offset
importance_score: f64
Semantic importance score (0.0-1.0)
estimated_tokens: usize
Estimated token count
dependencies: Vec<String>
Dependencies (other chunks this depends on)
name: Option<String>
Name/identifier of this chunk (if applicable)
is_public: bool
Whether this is publicly visible
has_documentation: bool
Whether this has documentation
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AstChunk
impl<'de> Deserialize<'de> for AstChunk
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 AstChunk
impl RefUnwindSafe for AstChunk
impl Send for AstChunk
impl Sync for AstChunk
impl Unpin for AstChunk
impl UnwindSafe for AstChunk
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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