pub struct FoldResult {
pub content: String,
pub symbols: Vec<Symbol>,
pub hidden_ranges: Vec<(usize, usize)>,
pub language: String,
pub tokens_est: usize,
}Expand description
Output of read().
Fields§
§content: StringThe rendered view the caller should hand to the model.
symbols: Vec<Symbol>Symbols extracted from the file, with original positions.
Byte ranges in the original source that were elided.
language: StringDetected language ("python", "typescript", …).
tokens_est: usizeEstimated token count for content. Uses cl100k_base (GPT-4 tokenizer)
as a proxy for Anthropic/OpenAI models — accurate to within ~15%.
Trait Implementations§
Source§impl Clone for FoldResult
impl Clone for FoldResult
Source§fn clone(&self) -> FoldResult
fn clone(&self) -> FoldResult
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 FoldResult
impl Debug for FoldResult
Source§impl PartialEq for FoldResult
impl PartialEq for FoldResult
Source§fn eq(&self, other: &FoldResult) -> bool
fn eq(&self, other: &FoldResult) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for FoldResult
impl StructuralPartialEq for FoldResult
Auto Trait Implementations§
impl Freeze for FoldResult
impl RefUnwindSafe for FoldResult
impl Send for FoldResult
impl Sync for FoldResult
impl Unpin for FoldResult
impl UnsafeUnpin for FoldResult
impl UnwindSafe for FoldResult
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