pub struct LineEstimate {
pub line: usize,
pub tokens: usize,
}Expand description
A per-line token estimate: the (1-based) line number and its estimated
token count. Returned by estimate_tokens_by_line so the CLI can
surface a breakdown (e.g. “which lines dominate this file’s cost”).
Fields§
§line: usize1-based line number, matching how editors and file:line
coordinates (§10.1 finding 4) count lines.
tokens: usizeEstimated tokens for this line’s content (its trailing \n is not
counted – newlines are cheap and would only add rounding noise per
line).
Trait Implementations§
Source§impl Clone for LineEstimate
impl Clone for LineEstimate
Source§fn clone(&self) -> LineEstimate
fn clone(&self) -> LineEstimate
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 moreimpl Copy for LineEstimate
Source§impl Debug for LineEstimate
impl Debug for LineEstimate
impl Eq for LineEstimate
Source§impl PartialEq for LineEstimate
impl PartialEq for LineEstimate
impl StructuralPartialEq for LineEstimate
Auto Trait Implementations§
impl Freeze for LineEstimate
impl RefUnwindSafe for LineEstimate
impl Send for LineEstimate
impl Sync for LineEstimate
impl Unpin for LineEstimate
impl UnsafeUnpin for LineEstimate
impl UnwindSafe for LineEstimate
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