pub struct CodeConstruct {
pub node_type: String,
pub name: Option<String>,
pub source_code: String,
pub start_line: usize,
pub end_line: usize,
pub start_byte: usize,
pub end_byte: usize,
pub parent: Option<Box<CodeConstruct>>,
pub children: Vec<CodeConstruct>,
pub metadata: ConstructMetadata,
}
Expand description
Represents a parsed code construct (function, class, struct, etc.)
This is the core data structure that represents any identifiable code element found during parsing. It includes the construct’s location, content, metadata, and hierarchical relationships with other constructs.
Fields§
§node_type: String
§name: Option<String>
§source_code: String
§start_line: usize
§end_line: usize
§start_byte: usize
§end_byte: usize
§parent: Option<Box<CodeConstruct>>
§children: Vec<CodeConstruct>
§metadata: ConstructMetadata
Trait Implementations§
Source§impl Clone for CodeConstruct
impl Clone for CodeConstruct
Source§fn clone(&self) -> CodeConstruct
fn clone(&self) -> CodeConstruct
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CodeConstruct
impl Debug for CodeConstruct
Source§impl<'de> Deserialize<'de> for CodeConstruct
impl<'de> Deserialize<'de> for CodeConstruct
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 CodeConstruct
impl RefUnwindSafe for CodeConstruct
impl Send for CodeConstruct
impl Sync for CodeConstruct
impl Unpin for CodeConstruct
impl UnwindSafe for CodeConstruct
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