Skip to main content

buffer_time_with

Function buffer_time_with 

Source
pub fn buffer_time_with<T, S, SF, SFut>(
    ms: u64,
    s: S,
    sleep_fn: SF,
) -> impl Stream<Item = Vec<T>>
where S: Stream<Item = T> + Unpin, SF: Fn(Duration) -> SFut, SFut: Future<Output = ()> + Unpin,
Expand description

Runtime-agnostic buffer_time with custom sleep function