operator_skip
Drop the first n values.
See Also
- FilterOperator - Keep values that satisfy a predicate.
- FilterMapOperator -
Map values to an
Optionand keep only theSomevalues. - TakeOperator -
Emit only the first
nvalues, then complete. - LiftOptionOperator -
Filter out
Noneand forwardSomevalues.
Example
cargo run -p rx_core --example operator_skip_example
let _subscription = (1..=5)
.into_observable()
.skip(2)
.subscribe(PrintObserver::new("skip_operator"));
Output:
skip_operator - next: 3
skip_operator - next: 4
skip_operator - next: 5
skip_operator - completed
skip_operator - unsubscribed