pub struct ExtractedAtom {Show 13 fields
pub name: String,
pub kind: AtomKind,
pub source: String,
pub start_byte: usize,
pub end_byte: usize,
pub start_line: usize,
pub end_line: usize,
pub defines: Vec<String>,
pub references: Vec<String>,
pub doc_comment: Option<String>,
pub visibility: Visibility,
pub parent: Option<String>,
pub decorators: Vec<String>,
}Expand description
An extracted code atom
Fields§
§name: StringName of the atom (function name, type name, etc.)
kind: AtomKindKind of atom
source: StringThe source code of this atom
start_byte: usizeByte offset in original source
end_byte: usize§start_line: usizeLine numbers (1-indexed)
end_line: usize§defines: Vec<String>Symbols this atom defines/exports
references: Vec<String>Symbols this atom references/imports
doc_comment: Option<String>Doc comment if present
visibility: VisibilityVisibility (public, private, etc.)
parent: Option<String>Parent atom (for nested items like methods in a class)
decorators: Vec<String>Decorators/attributes applied to this atom
Implementations§
Source§impl ExtractedAtom
impl ExtractedAtom
Sourcepub fn line_count(&self) -> usize
pub fn line_count(&self) -> usize
Get the number of lines in this atom
Sourcepub fn token_estimate(&self) -> usize
pub fn token_estimate(&self) -> usize
Estimate token count
Trait Implementations§
Source§impl Clone for ExtractedAtom
impl Clone for ExtractedAtom
Source§fn clone(&self) -> ExtractedAtom
fn clone(&self) -> ExtractedAtom
Returns a duplicate of the value. Read more
1.0.0 · 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 ExtractedAtom
impl Debug for ExtractedAtom
Source§impl<'de> Deserialize<'de> for ExtractedAtom
impl<'de> Deserialize<'de> for ExtractedAtom
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 ExtractedAtom
impl RefUnwindSafe for ExtractedAtom
impl Send for ExtractedAtom
impl Sync for ExtractedAtom
impl Unpin for ExtractedAtom
impl UnwindSafe for ExtractedAtom
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