MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / new

Method new

crates/opencode-session/src/compaction.rs:97–105  ·  view source on GitHub ↗
(input: u64, output: u64)

Source from the content-addressed store, hash-verified

95
96impl TokenUsage {
97 pub fn new(input: u64, output: u64) -> Self {
98 Self {
99 input,
100 output,
101 cache_read: 0,
102 cache_write: 0,
103 total: input + output,
104 }
105 }
106
107 pub fn with_cache(mut self, read: u64, write: u64) -> Self {
108 self.cache_read = read;

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected