pub struct CollectedVec<T> { /* private fields */ }Expand description
Values collected by collect_vec for one group.
Iteration follows the accumulator’s current insertion order, which is not a semantic guarantee: sort before scoring if order matters.
Implementations§
Source§impl<T> CollectedVec<T>
impl<T> CollectedVec<T>
Trait Implementations§
Source§impl<T> Accumulator<T, CollectedVec<T>> for CollectVecAccumulator<T>
impl<T> Accumulator<T, CollectedVec<T>> for CollectVecAccumulator<T>
Source§type Retraction = usize
type Retraction = usize
Retained handle needed to undo one accumulated value.
Source§fn accumulate(&mut self, value: T) -> Self::Retraction
fn accumulate(&mut self, value: T) -> Self::Retraction
Adds an owned value to the accumulator and returns its retraction handle.
Source§fn retract(&mut self, retraction: Self::Retraction)
fn retract(&mut self, retraction: Self::Retraction)
Removes a value previously represented by the retraction handle.
Source§fn with_result<R>(&self, f: impl FnOnce(&CollectedVec<T>) -> R) -> R
fn with_result<R>(&self, f: impl FnOnce(&CollectedVec<T>) -> R) -> R
Exposes the current result without forcing owned result materialization.
Source§impl<T: Debug> Debug for CollectedVec<T>
impl<T: Debug> Debug for CollectedVec<T>
Source§impl<'a, T> IntoIterator for &'a CollectedVec<T>
impl<'a, T> IntoIterator for &'a CollectedVec<T>
Auto Trait Implementations§
impl<T> Forget for CollectedVec<T>
impl<T> Freeze for CollectedVec<T>
impl<T> Move for CollectedVec<T>
impl<T> RefUnwindSafe for CollectedVec<T>
impl<T> Send for CollectedVec<T>
impl<T> Sync for CollectedVec<T>
impl<T> Unpin for CollectedVec<T>
impl<T> UnsafeUnpin for CollectedVec<T>
impl<T> UnwindSafe for CollectedVec<T>
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
Mutably borrows from an owned value. Read more