pub trait VectorObserverExt<T>: VectorObserver<T>{
Show 14 methods
// Provided methods
fn filter<F>(self, f: F) -> (Vector<T>, Filter<Self::Stream, F>)
where F: Fn(&T) -> bool { ... }
fn filter_map<U, F>(self, f: F) -> (Vector<U>, FilterMap<Self::Stream, F>)
where U: Clone,
F: Fn(T) -> Option<U> { ... }
fn head(
self,
limit: usize,
) -> (Vector<T>, Head<Self::Stream, EmptyLimitStream>) { ... }
fn dynamic_head<L>(self, limit_stream: L) -> Head<Self::Stream, L>
where L: Stream<Item = usize> { ... }
fn dynamic_head_with_initial_value<L>(
self,
initial_limit: usize,
limit_stream: L,
) -> (Vector<T>, Head<Self::Stream, L>)
where L: Stream<Item = usize> { ... }
fn tail(
self,
limit: usize,
) -> (Vector<T>, Tail<Self::Stream, EmptyLimitStream>) { ... }
fn dynamic_tail<L>(self, limit_stream: L) -> Tail<Self::Stream, L>
where L: Stream<Item = usize> { ... }
fn dynamic_tail_with_initial_value<L>(
self,
initial_limit: usize,
limit_stream: L,
) -> (Vector<T>, Tail<Self::Stream, L>)
where L: Stream<Item = usize> { ... }
fn skip(
self,
count: usize,
) -> (Vector<T>, Skip<Self::Stream, EmptyCountStream>) { ... }
fn dynamic_skip<C>(self, count_stream: C) -> Skip<Self::Stream, C>
where C: Stream<Item = usize> { ... }
fn dynamic_skip_with_initial_count<C>(
self,
initial_count: usize,
count_stream: C,
) -> (Vector<T>, Skip<Self::Stream, C>)
where C: Stream<Item = usize> { ... }
fn sort(self) -> (Vector<T>, Sort<Self::Stream>)
where T: Ord { ... }
fn sort_by<F>(self, compare: F) -> (Vector<T>, SortBy<Self::Stream, F>)
where F: Fn(&T, &T) -> Ordering { ... }
fn sort_by_key<F, K>(
self,
key_fn: F,
) -> (Vector<T>, SortByKey<Self::Stream, F>)
where F: Fn(&T) -> K,
K: Ord { ... }
}
Expand description
Convenience methods for VectorObserver
s.
See that trait for which types implement this.
Provided Methods§
Sourcefn filter<F>(self, f: F) -> (Vector<T>, Filter<Self::Stream, F>)
fn filter<F>(self, f: F) -> (Vector<T>, Filter<Self::Stream, F>)
Filter the vector’s values with the given function.
Sourcefn filter_map<U, F>(self, f: F) -> (Vector<U>, FilterMap<Self::Stream, F>)
fn filter_map<U, F>(self, f: F) -> (Vector<U>, FilterMap<Self::Stream, F>)
Filter and map the vector’s values with the given function.
Sourcefn head(self, limit: usize) -> (Vector<T>, Head<Self::Stream, EmptyLimitStream>)
fn head(self, limit: usize) -> (Vector<T>, Head<Self::Stream, EmptyLimitStream>)
Limit the observed values to the first limit
values.
See Head
for more details.
Sourcefn dynamic_head<L>(self, limit_stream: L) -> Head<Self::Stream, L>
fn dynamic_head<L>(self, limit_stream: L) -> Head<Self::Stream, L>
Limit the first observed values to a number of values determined by the given stream.
See Head
for more details.
Sourcefn dynamic_head_with_initial_value<L>(
self,
initial_limit: usize,
limit_stream: L,
) -> (Vector<T>, Head<Self::Stream, L>)
fn dynamic_head_with_initial_value<L>( self, initial_limit: usize, limit_stream: L, ) -> (Vector<T>, Head<Self::Stream, L>)
Limit the first observed values to initial_limit
values initially, and
update the limit with the value from the given stream.
See Head
for more details.
Sourcefn tail(self, limit: usize) -> (Vector<T>, Tail<Self::Stream, EmptyLimitStream>)
fn tail(self, limit: usize) -> (Vector<T>, Tail<Self::Stream, EmptyLimitStream>)
Limit the observed values to the last limit
values.
See Tail
for more details.
Sourcefn dynamic_tail<L>(self, limit_stream: L) -> Tail<Self::Stream, L>
fn dynamic_tail<L>(self, limit_stream: L) -> Tail<Self::Stream, L>
Limit the last observed values to a number of items determined by the given stream.
See Tail
for more details.
Sourcefn dynamic_tail_with_initial_value<L>(
self,
initial_limit: usize,
limit_stream: L,
) -> (Vector<T>, Tail<Self::Stream, L>)
fn dynamic_tail_with_initial_value<L>( self, initial_limit: usize, limit_stream: L, ) -> (Vector<T>, Tail<Self::Stream, L>)
Limit the last observed values to initial_limit
items initially, and
update the limit with the value from the given stream.
See Tail
for more details.
Sourcefn skip(self, count: usize) -> (Vector<T>, Skip<Self::Stream, EmptyCountStream>)
fn skip(self, count: usize) -> (Vector<T>, Skip<Self::Stream, EmptyCountStream>)
Skip the first count
observed values.
See Skip
for more details.
Sourcefn dynamic_skip<C>(self, count_stream: C) -> Skip<Self::Stream, C>
fn dynamic_skip<C>(self, count_stream: C) -> Skip<Self::Stream, C>
Skip the first count
observed values, where count
is determined by
the given stream.
See Skip
for more details.
Sourcefn dynamic_skip_with_initial_count<C>(
self,
initial_count: usize,
count_stream: C,
) -> (Vector<T>, Skip<Self::Stream, C>)
fn dynamic_skip_with_initial_count<C>( self, initial_count: usize, count_stream: C, ) -> (Vector<T>, Skip<Self::Stream, C>)
Skip the first initial_count
observed values, and update the count
with the values from the given stream.
See Skip
for more details.
Sourcefn sort(self) -> (Vector<T>, Sort<Self::Stream>)where
T: Ord,
fn sort(self) -> (Vector<T>, Sort<Self::Stream>)where
T: Ord,
Sort the observed values.
See Sort
for more details.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.