ChatUtf8LineBudgetCounter class final
Counts UTF-8 bytes and logical lines without joining input chunks.
Constructors
- ChatUtf8LineBudgetCounter({required int maxBytes, required int maxLines, required String resource})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
append(
String chunk) → ChatTextBudgetChunk -
checkpoint(
) → ChatUtf8LineBudgetCheckpoint - Begins trusted host bookkeeping that must be committed or rolled back.
-
commit(
ChatUtf8LineBudgetCheckpoint checkpoint) → void - Commits this counter's active host transaction.
-
finish(
) → ChatTextBudgetChunk -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rollback(
ChatUtf8LineBudgetCheckpoint checkpoint) → void - Rolls this counter's active host transaction back exactly once.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited