Handle
Methods
Types
WattReading
Method Reference
power(duration: f64) -> Result<f64>
Mean power over duration seconds.
Returns:
f64 — mean power in watts.
current(duration: f64) -> Result<f64> and voltage(duration: f64) -> Result<f64>
Mean current in amps and mean voltage in volts over the same kind of window. Both
need a meter that actually reports that quantity — a Joulescope or PPK2 does, a
power-only meter does not.
all(duration: f64) -> Result<WattReading>
Current, voltage and power gathered in a single instrument transaction. Prefer this
over three separate calls: it is one window rather than three, so the numbers
describe the same moment.
Examples
Compare sleep current against a budget
Supported Hardware
Notes
- There is no default window. The Rust API requires an explicit
duration, unlike the CLI, which defaults to0.1. - The client widens its HTTP budget to
max(30, duration + 20)seconds, so a long window does not trip the ordinary 10-second timeout. - A window is a real wait.
power(5.0)blocks your test for five seconds. - Fields on
WattReadingareOptionbecause a meter may not report all three; aNoneis “this instrument does not measure that”, not a failure.

