| ... | ... | @@ -165,25 +165,6 @@ pub const TerminalMode = union(enum) { |
| 165 | 165 | }; |
| 166 | 166 | }; |
| 167 | 167 | |
| 168 | | pub const Options = struct { |
| 169 | | /// User-provided buffer with static lifetime. |
| 170 | | /// |
| 171 | | /// Used to store the entire write buffer sent to the terminal. Progress output will be truncated if it |
| 172 | | /// cannot fit into this buffer which will look bad but not cause any malfunctions. |
| 173 | | /// |
| 174 | | /// Must be at least 200 bytes. |
| 175 | | draw_buffer: []u8 = &default_draw_buffer, |
| 176 | | /// How many nanoseconds between writing updates to the terminal. |
| 177 | | refresh_rate_ns: Io.Duration = .fromMilliseconds(80), |
| 178 | | /// How many nanoseconds to keep the output hidden |
| 179 | | initial_delay_ns: Io.Duration = .fromMilliseconds(200), |
| 180 | | /// If provided, causes the progress item to have a denominator. |
| 181 | | /// 0 means unknown. |
| 182 | | estimated_total_items: usize = 0, |
| 183 | | root_name: []const u8 = "", |
| 184 | | disable_printing: bool = false, |
| 185 | | }; |
| 186 | | |
| 187 | 168 | /// Represents one unit of progress. Each node can have children nodes, or |
| 188 | 169 | /// one can use integers with `update`. |
| 189 | 170 | pub const Node = struct { |
| ... | ... | @@ -578,6 +559,25 @@ pub const ParentFileError = error{ |
| 578 | 559 | UnrecognizedFormat, |
| 579 | 560 | }; |
| 580 | 561 | |
| 562 | pub const Options = struct { |
| 563 | /// User-provided buffer with static lifetime. |
| 564 | /// |
| 565 | /// Used to store the entire write buffer sent to the terminal. Progress output will be truncated if it |
| 566 | /// cannot fit into this buffer which will look bad but not cause any malfunctions. |
| 567 | /// |
| 568 | /// Must be at least 200 bytes. |
| 569 | draw_buffer: []u8 = &default_draw_buffer, |
| 570 | /// How many nanoseconds between writing updates to the terminal. |
| 571 | refresh_rate_ns: Io.Duration = .fromMilliseconds(80), |
| 572 | /// How many nanoseconds to keep the output hidden |
| 573 | initial_delay_ns: Io.Duration = .fromMilliseconds(200), |
| 574 | /// If provided, causes the progress item to have a denominator. |
| 575 | /// 0 means unknown. |
| 576 | estimated_total_items: usize = 0, |
| 577 | root_name: []const u8 = "", |
| 578 | disable_printing: bool = false, |
| 579 | }; |
| 580 | |
| 581 | 581 | /// Initializes a global Progress instance. |
| 582 | 582 | /// |
| 583 | 583 | /// Asserts there is only one global Progress instance. |