hwylterm/progress

Source   Edit  

Types

Progress = object
Source   Edit  
ProgressSegment = enum
  Bar, Fraction, Percent
Source   Edit  
ProgressStyle = object
  ## complete and incomplete should be equal len
Style for progress bar Source   Edit  

Procs

proc inc(p: var Progress; v: Natural = 1) {.inline, ...raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc newProgress(total: int = 0; style: ProgressStyle = defaultStyle;
                 segments: openArray[ProgressSegment] = @[Bar]): Progress {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  

Iterators

iterator progress[T](items: openArray[T]): T
Source   Edit  
iterator progress[T](p: var Progress; items: openArray[T]): T
Source   Edit  
iterator progress[T](p: var Progress; spinner: var Spinny; items: openArray[T]): T
Source   Edit  
iterator progress[T](spinner: var Spinny; items: openArray[T]): T
Source   Edit