LibTmux.Mcp.BoundedText
- public sealed record BoundedText( IRead
Only <string> Lines, bool Truncated, int DroppedList Lines , int DroppedBytes ) -
Terminal text cut to fit a budget, with what was cut reported.
Description
Dropping is always from the oldest end. A terminal's newest line is the one that says what happened, so a budget that discarded it would answer the wrong question. Reporting the loss is what separates a short answer from a wrong one: a reader who cannot see that lines are missing will conclude the pane never printed them.
- Parameters
-
-
Lines(IReadOnly <string>) – The text that fits, oldest first.List -
Truncated(bool) – Whether anything was dropped to make it fit. -
DroppedLines(int) – How many complete lines were dropped from the start. -
DroppedBytes(int) – The exact number of UTF-8 bytes of PANE TEXT dropped from the start. This is not the unit the byte budget is spent in: that bounds the whole serialized result, where the same text is escaped as JSON and carried twice, so for wide characters it can be several times larger than the number here.
-
Properties4
| Name | Type | Description |
|---|---|---|
| Lines | IRead | The text that fits, oldest first. |
| Truncated | bool | Whether anything was dropped to make it fit. |
| DroppedLines | int | How many complete lines were dropped from the start. |
| DroppedBytes | int | The exact number of UTF-8 bytes of PANE TEXT dropped from the start. This is not the unit the byte budget is spent in: that bounds the whole serialized result, where the same text is escaped as JSON and carried twice, so for wide characters it can be several times larger than the number here. |
Other members3 members
- Empty: Bounded
Text property An empty result that dropped nothing. - Fit method Cuts lines down to a line and byte budget, keeping the newest.
- ToDisplayString method Renders the text as one block, noting any loss at the top.