Function rxrust::observable::repeat
source · [−]Expand description
Creates an observable producing same value repeated N times.
Completes immediately after emitting N values. Never emits an error.
Arguments
v
- A value to emits.n
- A number of time to repeat it.
Examples
use rxrust::prelude::*;
observable::repeat(123, 3)
.subscribe(|v| {println!("{},", v)});
// print log:
// 123
// 123
// 123