pub struct TokenAudit {
pub output_bytes: u64,
pub tokens_min: usize,
pub tokens_est: usize,
pub tokens_max: usize,
pub overhead_bytes: u64,
pub overhead_pct: f64,
}Expand description
Post-write audit comparing actual output to estimates.
Fields§
§output_bytes: u64Actual bytes written to the output bundle.
tokens_min: usizetokens = output_bytes / bytes_per_token_high (optimistic, fewest tokens).
tokens_est: usizetokens = output_bytes / bytes_per_token_est.
tokens_max: usizetokens = output_bytes / bytes_per_token_low (conservative, most tokens).
overhead_bytes: u64Bytes of framing/separators/headers (output_bytes - content_bytes).
overhead_pct: f64overhead_bytes / output_bytes (0.0-1.0).
Implementations§
Source§impl TokenAudit
impl TokenAudit
Sourcepub fn from_output(output_bytes: u64, content_bytes: u64) -> Self
pub fn from_output(output_bytes: u64, content_bytes: u64) -> Self
Create an audit from output bytes and content bytes.
Trait Implementations§
Source§impl Clone for TokenAudit
impl Clone for TokenAudit
Source§fn clone(&self) -> TokenAudit
fn clone(&self) -> TokenAudit
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 TokenAudit
impl Debug for TokenAudit
Source§impl<'de> Deserialize<'de> for TokenAudit
impl<'de> Deserialize<'de> for TokenAudit
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 TokenAudit
impl RefUnwindSafe for TokenAudit
impl Send for TokenAudit
impl Sync for TokenAudit
impl Unpin for TokenAudit
impl UnsafeUnpin for TokenAudit
impl UnwindSafe for TokenAudit
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