pub enum AggregationStrategy {
LastWins,
CollectAll,
Original,
Custom(Arc<dyn Fn(Exchange, Exchange) -> Exchange + Send + Sync>),
}Expand description
Strategy for aggregating fragment results back into a single exchange.
Variants§
LastWins
Result is the last fragment’s exchange (default).
CollectAll
Collects all fragment bodies into a JSON array.
Original
Returns the original exchange unchanged.
Custom(Arc<dyn Fn(Exchange, Exchange) -> Exchange + Send + Sync>)
Custom aggregation function: (accumulated, next) -> merged.
Trait Implementations§
Source§impl Clone for AggregationStrategy
impl Clone for AggregationStrategy
Source§fn clone(&self) -> AggregationStrategy
fn clone(&self) -> AggregationStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for AggregationStrategy
impl Default for AggregationStrategy
Source§fn default() -> AggregationStrategy
fn default() -> AggregationStrategy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AggregationStrategy
impl !RefUnwindSafe for AggregationStrategy
impl Send for AggregationStrategy
impl Sync for AggregationStrategy
impl Unpin for AggregationStrategy
impl UnsafeUnpin for AggregationStrategy
impl !UnwindSafe for AggregationStrategy
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