pub struct Window<OE, OE1> { /* private fields */ }Expand description
Periodically subdivides items from an Observable into Observable windows.
A new window is emitted whenever the boundary Observable emits an item.
Completing the boundary stops future window rotation without terminating the current window
or the outer Observable.
An error from the boundary terminates the current window and the outer Observable.
Each window is a single-consumer pipe: it can be subscribed to once, it buffers the items that arrive while it has no subscriber, and dropping it without subscribing discards its items. A window is serialized on its own rather than together with the outer Observable, so the events of a window keep their order among themselves, but they are not ordered against the emission of a later window. Disposing the outer subscription drops the observer of the open window without notifying it.
Disposing the subscription of a single window does not necessarily release its observer where it happens: the window releases it on its next item, when it ends, or when the outer subscription is disposed, whichever comes first. See the unicast subject each window is built on. See https://reactivex.io/documentation/operators/window.html
§Examples
use rx_rust::{
observable::ObservableExt,
observer::{Observer, Termination},
operators::transforming::window::Window,
subject::publish_subject::PublishSubject,
};
use std::{convert::Infallible, sync::{Arc, Mutex}};
let windows = Arc::new(Mutex::new(Vec::<Vec<i32>>::new()));
let terminations = Arc::new(Mutex::new(Vec::new()));
let inner_subscriptions = Arc::new(Mutex::new(Vec::new()));
let mut source: PublishSubject<'_, i32, Infallible> = PublishSubject::default();
let mut boundary: PublishSubject<'_, (), Infallible> = PublishSubject::default();
let windows_observer = Arc::clone(&windows);
let terminations_observer = Arc::clone(&terminations);
let inner_subscriptions_observer = Arc::clone(&inner_subscriptions);
let subscription = Window::new(source.clone(), boundary.clone()).subscribe_with_callback(
move |window| {
let index = {
let mut windows = windows_observer.lock().unwrap();
windows.push(Vec::new());
windows.len() - 1
};
let windows_for_values = Arc::clone(&windows_observer);
let sub = window.subscribe_with_callback(
move |value| {
windows_for_values.lock().unwrap()[index].push(value);
},
|_| {},
);
inner_subscriptions_observer.lock().unwrap().push(sub);
},
move |termination| terminations_observer
.lock()
.unwrap()
.push(termination),
);
source.on_next(1);
source.on_next(2);
boundary.on_next(());
source.on_next(3);
source.on_termination(Termination::Completed);
drop(subscription);
inner_subscriptions.lock().unwrap().drain(..).for_each(drop);
assert_eq!(
&*windows.lock().unwrap(),
&[vec![1, 2], vec![3]]
);
assert_eq!(
&*terminations.lock().unwrap(),
&[Termination::Completed]
);Implementations§
Trait Implementations§
Source§impl<'or, T, E, OE, OE1> Observable<'or, UnicastObservable<'or, T, E>, E> for Window<OE, OE1>where
T: MaybeSend + 'or,
E: Clone + MaybeSend + 'or,
OE: Observable<'or, T, E>,
OE::D: MaybeSend + 'or,
OE1: Observable<'or, (), E>,
OE1::D: MaybeSend + 'or,
impl<'or, T, E, OE, OE1> Observable<'or, UnicastObservable<'or, T, E>, E> for Window<OE, OE1>where
T: MaybeSend + 'or,
E: Clone + MaybeSend + 'or,
OE: Observable<'or, T, E>,
OE::D: MaybeSend + 'or,
OE1: Observable<'or, (), E>,
OE1::D: MaybeSend + 'or,
type D = BoxedDisposal<'or>
Source§fn subscribe(
self,
observer: impl Observer<UnicastObservable<'or, T, E>, E> + MaybeSend + 'or,
) -> Subscription<Self::D>
fn subscribe( self, observer: impl Observer<UnicastObservable<'or, T, E>, E> + MaybeSend + 'or, ) -> Subscription<Self::D>
subscribe method returns a Subscription which can be used to unsubscribe the observer from the observable.
We use Subscription struct instead of trait like impl Cancellable, because we need to cancel the subscription when the Subscription is dropped. It’s not possible to implement Drop for a trait object.Auto Trait Implementations§
impl<OE, OE1> Freeze for Window<OE, OE1>
impl<OE, OE1> RefUnwindSafe for Window<OE, OE1>where
OE: RefUnwindSafe,
OE1: RefUnwindSafe,
impl<OE, OE1> Send for Window<OE, OE1>
impl<OE, OE1> Sync for Window<OE, OE1>
impl<OE, OE1> Unpin for Window<OE, OE1>
impl<OE, OE1> UnsafeUnpin for Window<OE, OE1>where
OE: UnsafeUnpin,
OE1: UnsafeUnpin,
impl<OE, OE1> UnwindSafe for Window<OE, OE1>where
OE: UnwindSafe,
OE1: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSync for Twhere
T: Sync,
Source§impl<'or, T, E, OE> ObservableExt<'or, T, E> for OEwhere
OE: Observable<'or, T, E>,
impl<'or, T, E, OE> ObservableExt<'or, T, E> for OEwhere
OE: Observable<'or, T, E>,
Source§fn all<F>(self, callback: F) -> All<T, Self, F>
fn all<F>(self, callback: F) -> All<T, Self, F>
bool indicating whether every item satisfies the provided predicate.Source§fn amb_with<OE1>(self, other: OE1) -> Amb<[EitherObservable<Self, OE1>; 2]>where
OE1: Observable<'or, T, E>,
fn amb_with<OE1>(self, other: OE1) -> Amb<[EitherObservable<Self, OE1>; 2]>where
OE1: Observable<'or, T, E>,
Source§fn average(self) -> Average<T, Self>
fn average(self) -> Average<T, Self>
Source§fn buffer<OE1>(self, boundary: OE1) -> Buffer<Self, OE1>where
OE1: Observable<'or, (), E>,
fn buffer<OE1>(self, boundary: OE1) -> Buffer<Self, OE1>where
OE1: Observable<'or, (), E>,
window, a completed boundary does not
leave the current buffer open.Source§fn buffer_with_count(self, count: NonZeroUsize) -> BufferWithCount<Self>
fn buffer_with_count(self, count: NonZeroUsize) -> BufferWithCount<Self>
Source§fn buffer_with_time<S>(
self,
time_span: Duration,
scheduler: S,
delay: Option<Duration>,
) -> BufferWithTime<'or, Self, S>
fn buffer_with_time<S>( self, time_span: Duration, scheduler: S, delay: Option<Duration>, ) -> BufferWithTime<'or, Self, S>
Source§fn buffer_with_time_or_count<S>(
self,
count: NonZeroUsize,
time_span: Duration,
scheduler: S,
delay: Option<Duration>,
) -> BufferWithTimeOrCount<Self, S>
fn buffer_with_time_or_count<S>( self, count: NonZeroUsize, time_span: Duration, scheduler: S, delay: Option<Duration>, ) -> BufferWithTimeOrCount<Self, S>
Source§fn catch<E1, OE1, F>(self, callback: F) -> Catch<E, Self, F>where
OE1: Observable<'or, T, E1>,
F: FnOnce(E) -> OE1,
fn catch<E1, OE1, F>(self, callback: F) -> Catch<E, Self, F>where
OE1: Observable<'or, T, E1>,
F: FnOnce(E) -> OE1,
Source§fn collect<C>(self) -> Collect<C, T, Self>
fn collect<C>(self) -> Collect<C, T, Self>
Default and Extend, and emits it
when the source completes. See to_vec for the Vec<T> case.Source§fn combine_latest<T1, OE2>(
self,
another_source: OE2,
) -> CombineLatest<Self, OE2>where
OE2: Observable<'or, T1, E>,
fn combine_latest<T1, OE2>(
self,
another_source: OE2,
) -> CombineLatest<Self, OE2>where
OE2: Observable<'or, T1, E>,
Source§fn concat_all<T1>(self) -> ConcatAll<Self, T>where
T: Observable<'or, T1, E>,
fn concat_all<T1>(self) -> ConcatAll<Self, T>where
T: Observable<'or, T1, E>,
Source§fn concat_map<T1, OE1, F>(self, callback: F) -> ConcatMap<T, Self, OE1, F>where
OE1: Observable<'or, T1, E>,
F: FnMut(T) -> OE1,
fn concat_map<T1, OE1, F>(self, callback: F) -> ConcatMap<T, Self, OE1, F>where
OE1: Observable<'or, T1, E>,
F: FnMut(T) -> OE1,
Source§fn concat_with<OE2>(self, source_2: OE2) -> Concat<Self, OE2>where
OE2: Observable<'or, T, E>,
fn concat_with<OE2>(self, source_2: OE2) -> Concat<Self, OE2>where
OE2: Observable<'or, T, E>,
Source§fn contains(self, item: T) -> Contains<T, Self>
fn contains(self, item: T) -> Contains<T, Self>
true if the sequence contains the provided item, false otherwise.Source§fn count(self) -> Count<T, Self>
fn count(self) -> Count<T, Self>
Source§fn debounce<S>(
self,
time_span: Duration,
scheduler: S,
) -> Debounce<'or, Self, S>
fn debounce<S>( self, time_span: Duration, scheduler: S, ) -> Debounce<'or, Self, S>
Source§fn debug<C, F>(self, context: C, callback: F) -> Debug<Self, C, F>where
F: Fn(C, DebugEvent<'_, T, E>),
fn debug<C, F>(self, context: C, callback: F) -> Debug<Self, C, F>where
F: Fn(C, DebugEvent<'_, T, E>),
Source§fn debug_default_print<L>(
self,
label: L,
) -> Debug<Self, L, DefaultPrintType<L, T, E>>
fn debug_default_print<L>( self, label: L, ) -> Debug<Self, L, DefaultPrintType<L, T, E>>
Source§fn default_if_empty(self, default_value: T) -> DefaultIfEmpty<T, Self>
fn default_if_empty(self, default_value: T) -> DefaultIfEmpty<T, Self>
Source§fn delay<S>(self, delay: Duration, scheduler: S) -> Delay<'or, Self, S>
fn delay<S>(self, delay: Duration, scheduler: S) -> Delay<'or, Self, S>
Source§fn dematerialize(self) -> Dematerialize<Self>
fn dematerialize(self) -> Dematerialize<Self>
Source§fn distinct(self) -> Distinct<Self, fn(&T) -> T>where
T: Clone,
fn distinct(self) -> Distinct<Self, fn(&T) -> T>where
T: Clone,
Source§fn distinct_until_changed(self) -> DistinctUntilChanged<Self, fn(&T) -> T>where
T: Clone,
fn distinct_until_changed(self) -> DistinctUntilChanged<Self, fn(&T) -> T>where
T: Clone,
Source§fn distinct_until_changed_with_key_selector<F, K>(
self,
key_selector: F,
) -> DistinctUntilChanged<Self, F>
fn distinct_until_changed_with_key_selector<F, K>( self, key_selector: F, ) -> DistinctUntilChanged<Self, F>
Source§fn distinct_with_key_selector<F, K>(self, key_selector: F) -> Distinct<Self, F>
fn distinct_with_key_selector<F, K>(self, key_selector: F) -> Distinct<Self, F>
Source§fn do_after_disposal<F>(self, callback: F) -> DoAfterDisposal<Self, F>where
F: FnOnce(),
fn do_after_disposal<F>(self, callback: F) -> DoAfterDisposal<Self, F>where
F: FnOnce(),
Source§fn do_after_next<F>(self, callback: F) -> DoAfterNext<Self, F>where
F: FnMut(T),
fn do_after_next<F>(self, callback: F) -> DoAfterNext<Self, F>where
F: FnMut(T),
Source§fn do_after_subscription<F>(self, callback: F) -> DoAfterSubscription<Self, F>where
F: FnOnce(),
fn do_after_subscription<F>(self, callback: F) -> DoAfterSubscription<Self, F>where
F: FnOnce(),
Source§fn do_after_termination<F>(self, callback: F) -> DoAfterTermination<Self, F>where
F: FnOnce(Termination<E>),
fn do_after_termination<F>(self, callback: F) -> DoAfterTermination<Self, F>where
F: FnOnce(Termination<E>),
Source§fn do_before_disposal<F>(self, callback: F) -> DoBeforeDisposal<Self, F>where
F: FnOnce(),
fn do_before_disposal<F>(self, callback: F) -> DoBeforeDisposal<Self, F>where
F: FnOnce(),
Source§fn do_before_next<F>(self, callback: F) -> DoBeforeNext<Self, F>
fn do_before_next<F>(self, callback: F) -> DoBeforeNext<Self, F>
Source§fn do_before_subscription<F>(self, callback: F) -> DoBeforeSubscription<Self, F>where
F: FnOnce(),
fn do_before_subscription<F>(self, callback: F) -> DoBeforeSubscription<Self, F>where
F: FnOnce(),
Source§fn do_before_termination<F>(self, callback: F) -> DoBeforeTermination<Self, F>where
F: FnOnce(&Termination<E>),
fn do_before_termination<F>(self, callback: F) -> DoBeforeTermination<Self, F>where
F: FnOnce(&Termination<E>),
Source§fn element_at(self, index: usize) -> ElementAt<Self>
fn element_at(self, index: usize) -> ElementAt<Self>
Source§fn filter<F>(self, callback: F) -> Filter<Self, F>
fn filter<F>(self, callback: F) -> Filter<Self, F>
true.Source§fn flat_map<T1, OE1, F>(self, callback: F) -> FlatMap<T, Self, OE1, F>where
OE1: Observable<'or, T1, E>,
F: FnMut(T) -> OE1,
fn flat_map<T1, OE1, F>(self, callback: F) -> FlatMap<T, Self, OE1, F>where
OE1: Observable<'or, T1, E>,
F: FnMut(T) -> OE1,
Source§fn group_by<F, K>(self, key_selector: F) -> GroupBy<Self, F, K>
fn group_by<F, K>(self, key_selector: F) -> GroupBy<Self, F, K>
Source§fn hook_on_next<F>(self, callback: F) -> HookOnNext<Self, F>
fn hook_on_next<F>(self, callback: F) -> HookOnNext<Self, F>
Source§fn hook_on_subscription<D, F>(self, callback: F) -> HookOnSubscription<Self, F>
fn hook_on_subscription<D, F>(self, callback: F) -> HookOnSubscription<Self, F>
Source§fn hook_on_termination<F>(self, callback: F) -> HookOnTermination<Self, F>
fn hook_on_termination<F>(self, callback: F) -> HookOnTermination<Self, F>
Source§fn ignore_elements(self) -> IgnoreElements<Self>
fn ignore_elements(self) -> IgnoreElements<Self>
Source§fn into_boxed<'sub, 'oe>(self) -> BoxedObservable<'or, 'sub, 'oe, T, E>
fn into_boxed<'sub, 'oe>(self) -> BoxedObservable<'or, 'sub, 'oe, T, E>
Source§fn into_cloneable_boxed<'sub, 'oe>(
self,
) -> CloneableBoxedObservable<'or, 'sub, 'oe, T, E>
fn into_cloneable_boxed<'sub, 'oe>( self, ) -> CloneableBoxedObservable<'or, 'sub, 'oe, T, E>
Source§fn into_future(self) -> ObservableFuture<'or, T, Self> ⓘwhere
Self: Observable<'or, T, Infallible>,
fn into_future(self) -> ObservableFuture<'or, T, Self> ⓘwhere
Self: Observable<'or, T, Infallible>,
Some(item), or None when the
source completes without one. The source is stopped as soon as the item is in. Read moreSource§fn into_stream(self) -> ObservableStream<'or, T, Self>where
Self: Observable<'or, T, Infallible>,
fn into_stream(self) -> ObservableStream<'or, T, Self>where
Self: Observable<'or, T, Infallible>,
Source§fn into_stream_with<B>(self, buffer: B) -> ObservableStream<'or, T, Self, B>
fn into_stream_with<B>(self, buffer: B) -> ObservableStream<'or, T, Self, B>
buffer, which decides what a source faster than the consumer costs. Read moreSource§fn into_try_future(self) -> ObservableTryFuture<'or, T, E, Self> ⓘ
fn into_try_future(self) -> ObservableTryFuture<'or, T, E, Self> ⓘ
Ok(Some(item)), Ok(None) when
the source completes without one, or Err(error) when it fails first. The source is
stopped as soon as the item is in. Read moreSource§fn into_try_stream(self) -> ObservableTryStream<'or, T, E, Self>
fn into_try_stream(self) -> ObservableTryStream<'or, T, E, Self>
Results: each item as Ok, and an error
as the last item, Err, before the stream ends. Read moreSource§fn into_try_stream_with<B>(
self,
buffer: B,
) -> ObservableTryStream<'or, T, E, Self, B>where
B: StreamBuffer<T>,
fn into_try_stream_with<B>(
self,
buffer: B,
) -> ObservableTryStream<'or, T, E, Self, B>where
B: StreamBuffer<T>,
Results that keeps the items arriving
between two polls in buffer. This is into_stream_with for
a source that can fail; see there for the buffers.Source§fn last(self) -> Last<Self>
fn last(self) -> Last<Self>
Source§fn map<T1, F>(self, callback: F) -> Map<T, Self, F>where
F: FnMut(T) -> T1,
fn map<T1, F>(self, callback: F) -> Map<T, Self, F>where
F: FnMut(T) -> T1,
Source§fn map_err<E1, F>(self, callback: F) -> MapErr<E, Self, F>where
F: FnOnce(E) -> E1,
fn map_err<E1, F>(self, callback: F) -> MapErr<E, Self, F>where
F: FnOnce(E) -> E1,
Source§fn materialize(self) -> Materialize<Self>
fn materialize(self) -> Materialize<Self>
Source§fn max(self) -> Max<Self>
fn max(self) -> Max<Self>
Source§fn merge_all<T1>(self) -> MergeAll<Self, T>where
T: Observable<'or, T1, E>,
fn merge_all<T1>(self) -> MergeAll<Self, T>where
T: Observable<'or, T1, E>,
Source§fn merge_with<OE2>(self, source_2: OE2) -> Merge<Self, OE2>where
OE2: Observable<'or, T, E>,
fn merge_with<OE2>(self, source_2: OE2) -> Merge<Self, OE2>where
OE2: Observable<'or, T, E>,
Source§fn min(self) -> Min<Self>
fn min(self) -> Min<Self>
Source§fn multicast<S, F>(self, subject_maker: F) -> ConnectableController<Self, S>where
F: FnOnce() -> S,
fn multicast<S, F>(self, subject_maker: F) -> ConnectableController<Self, S>where
F: FnOnce() -> S,
Source§fn observe_on<S>(self, scheduler: S) -> ObserveOn<'or, Self, S>
fn observe_on<S>(self, scheduler: S) -> ObserveOn<'or, Self, S>
Source§fn publish(self) -> ConnectableController<Self, PublishSubject<'or, T, E>>
fn publish(self) -> ConnectableController<Self, PublishSubject<'or, T, E>>
PublishSubject.Source§fn publish_last(self) -> ConnectableController<Self, AsyncSubject<'or, T, E>>
fn publish_last(self) -> ConnectableController<Self, AsyncSubject<'or, T, E>>
AsyncSubject, emitting only the last value.Source§fn reduce<T0, F>(self, initial_value: T0, callback: F) -> Reduce<T0, T, Self, F>where
F: FnMut(T0, T) -> T0,
fn reduce<T0, F>(self, initial_value: T0, callback: F) -> Reduce<T0, T, Self, F>where
F: FnMut(T0, T) -> T0,
Source§fn replay(
self,
buffer_size: Option<usize>,
) -> ConnectableController<Self, ReplaySubject<'or, T, E>>
fn replay( self, buffer_size: Option<usize>, ) -> ConnectableController<Self, ReplaySubject<'or, T, E>>
ReplaySubject configured with the given buffer size.Source§fn retry<OE1, F>(self, callback: F) -> Retry<Self, F>
fn retry<OE1, F>(self, callback: F) -> Retry<Self, F>
Source§fn sample<OE1>(self, sampler: OE1) -> Sample<Self, OE1>where
OE1: Observable<'or, (), E>,
fn sample<OE1>(self, sampler: OE1) -> Sample<Self, OE1>where
OE1: Observable<'or, (), E>,
Source§fn scan<T0, F>(self, initial_value: T0, callback: F) -> Scan<T0, T, Self, F>where
F: FnMut(T0, T) -> T0,
fn scan<T0, F>(self, initial_value: T0, callback: F) -> Scan<T0, T, Self, F>where
F: FnMut(T0, T) -> T0,
Source§fn sequence_equal<OE2>(self, another_source: OE2) -> SequenceEqual<T, Self, OE2>where
OE2: Observable<'or, T, E>,
fn sequence_equal<OE2>(self, another_source: OE2) -> SequenceEqual<T, Self, OE2>where
OE2: Observable<'or, T, E>,
PublishSubject semantics.Source§fn skip(self, count: usize) -> Skip<Self>
fn skip(self, count: usize) -> Skip<Self>
count items before emitting the remainder of the sequence.Source§fn skip_last(self, count: usize) -> SkipLast<Self>
fn skip_last(self, count: usize) -> SkipLast<Self>
count items emitted by the source.Source§fn skip_until<OE1>(self, start: OE1) -> SkipUntil<Self, OE1>where
OE1: Observable<'or, (), E>,
fn skip_until<OE1>(self, start: OE1) -> SkipUntil<Self, OE1>where
OE1: Observable<'or, (), E>,
Source§fn skip_while<F>(self, callback: F) -> SkipWhile<Self, F>
fn skip_while<F>(self, callback: F) -> SkipWhile<Self, F>
true, then emits the remaining items.Source§fn start_with<I>(self, values: I) -> StartWith<Self, I>where
I: IntoIterator<Item = T>,
fn start_with<I>(self, values: I) -> StartWith<Self, I>where
I: IntoIterator<Item = T>,
Source§fn subscribe_on<S>(self, scheduler: S) -> SubscribeOn<'or, Self, S>
fn subscribe_on<S>(self, scheduler: S) -> SubscribeOn<'or, Self, S>
Source§fn subscribe_with_callback<FN, FT, R>(
self,
on_next: FN,
on_termination: FT,
) -> Subscription<Self::D>
fn subscribe_with_callback<FN, FT, R>( self, on_next: FN, on_termination: FT, ) -> Subscription<Self::D>
Source§fn switch<T1>(self) -> Switch<Self, T>where
T: Observable<'or, T1, E>,
fn switch<T1>(self) -> Switch<Self, T>where
T: Observable<'or, T1, E>,
Source§fn switch_map<T1, OE1, F>(self, callback: F) -> SwitchMap<T, Self, OE1, F>where
OE1: Observable<'or, T1, E>,
F: FnMut(T) -> OE1,
fn switch_map<T1, OE1, F>(self, callback: F) -> SwitchMap<T, Self, OE1, F>where
OE1: Observable<'or, T1, E>,
F: FnMut(T) -> OE1,
Source§fn take(self, count: usize) -> Take<Self>
fn take(self, count: usize) -> Take<Self>
count items from the source before completing.Source§fn take_last(self, count: usize) -> TakeLast<Self>
fn take_last(self, count: usize) -> TakeLast<Self>
count items produced by the source.Source§fn take_until<OE1>(self, stop: OE1) -> TakeUntil<Self, OE1>where
OE1: Observable<'or, (), E>,
fn take_until<OE1>(self, stop: OE1) -> TakeUntil<Self, OE1>where
OE1: Observable<'or, (), E>,
Source§fn take_while<F>(self, callback: F) -> TakeWhile<Self, F>
fn take_while<F>(self, callback: F) -> TakeWhile<Self, F>
true, then completes.Source§fn throttle(self, time_span: Duration) -> Throttle<Self>
fn throttle(self, time_span: Duration) -> Throttle<Self>
Source§fn time_interval(self) -> TimeInterval<Self>
fn time_interval(self) -> TimeInterval<Self>
Source§fn timeout<S>(self, duration: Duration, scheduler: S) -> Timeout<'or, Self, S>
fn timeout<S>(self, duration: Duration, scheduler: S) -> Timeout<'or, Self, S>
Source§fn timestamp(self) -> Timestamp<Self>
fn timestamp(self) -> Timestamp<Self>
Source§fn window<OE1>(self, boundary: OE1) -> Window<Self, OE1>where
OE1: Observable<'or, (), E>,
fn window<OE1>(self, boundary: OE1) -> Window<Self, OE1>where
OE1: Observable<'or, (), E>,
Source§fn window_with_count(self, count: NonZeroUsize) -> WindowWithCount<Self>
fn window_with_count(self, count: NonZeroUsize) -> WindowWithCount<Self>
Source§fn with_error_type<E1>(self) -> WithErrorType<E1, Self>
fn with_error_type<E1>(self) -> WithErrorType<E1, Self>
Infallible a concrete error type.Source§fn with_item_type<T1>(self) -> WithItemType<T1, Self>
fn with_item_type<T1>(self) -> WithItemType<T1, Self>
Infallible a concrete item type.