Skip to content

Commit

Permalink
Add docs for MultiFruit and FruitHandle
Browse files Browse the repository at this point in the history
  • Loading branch information
ppodolsky committed May 4, 2022
1 parent ebeeaaf commit fdea97e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/collector/multi_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use super::{Collector, SegmentCollector};
use crate::collector::Fruit;
use crate::{DocId, Score, SegmentOrdinal, SegmentReader, TantivyError};

/// MultiFruit keeps Fruits from every nested Collector
pub struct MultiFruit {
sub_fruits: Vec<Option<Box<dyn Fruit>>>,
}
Expand Down Expand Up @@ -79,6 +80,7 @@ impl<TSegmentCollector: SegmentCollector> BoxableSegmentCollector
}
}

/// FruitHandle stores reference to the corresponding collector inside MultiCollector
pub struct FruitHandle<TFruit: Fruit> {
pos: usize,
_phantom: PhantomData<TFruit>,
Expand Down

0 comments on commit fdea97e

Please sign in to comment.