TokenUsage class
Token usage detail (with cache breakdown). Mirrors TokenUsage.ts.
All fields are nullable: total is always serialized by the Rust core
(null when unknown), the rest are omitted when None.
- Annotations
-
- @JsonSerializable.new()
Constructors
- TokenUsage({int? total, int? noCache, int? cacheRead, int? cacheWrite, int? text, int? reasoning})
-
TokenUsage.fromJson(Map<
String, dynamic> json) -
factory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited