FGRibreau / FGRibreau/spinners
Is there a way to place the spinner on a chosen column?
- Lenguaje dominante
- Rust
- Estrellas
- 602
- Forks
- 29
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.