FGRibreau / FGRibreau/spinners
Is there a way to place the spinner on a chosen column?
- 主要語言
- Rust
- 星號
- 602
- 分支
- 29
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Hi,
Say, the second console column, instead of the first one by default. It looks like `SpinnerBuilder` is responsible for customization, but it is unavailable in the `spinners` context. Or is it just my lack of experience?
This example does precisely what I want:
```
extern crate spinner;
use std::time::Duration;
use std::thread;
use spinner::SpinnerBuilder;
fn main() {
let sp = SpinnerBuilder::new("Long Running op!".into()).
format(|sp, status|{
format!(" {spin} -- Currently working on: \'{status}\' -- {spin}",
spin = sp, status = status)
}).start();
thread::sleep(Duration::from_millis(2000));
sp.message("Updating...".into());
sp.update("Fixing things...".into());
thread::sleep(Duration::from_millis(2000));
sp.message("Done!".into());
sp.close();
}
```
The line
```
format!(" {spin} -- Currently working on: \'{status}\' -- {spin}",
```
Is all I need.
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。