pub struct AggregatingStrategyConfig {
pub aggregation_threshold: Option<u32>,
pub unrealized_balance_ratio: Option<f64>,
pub aggregate_on_channel_close: bool,
}
Expand description
Configuration object for the AggregatingStrategy
Fields§
§aggregation_threshold: Option<u32>
Number of acknowledged winning tickets in a channel that triggers the ticket aggregation in that channel when exceeded.
This condition is independent of unrealized_balance_ratio
.
Default is 250.
unrealized_balance_ratio: Option<f64>
Percentage of unrealized balance in unaggregated tickets in a channel that triggers the ticket aggregation when exceeded.
The unrealized balance in this case is the proportion of the channel balance allocated in unredeemed
unaggregated tickets. This condition is independent of aggregation_threshold
.
Default is 0.9
aggregate_on_channel_close: bool
If set, the strategy will automatically aggregate tickets in channel that has transitioned
to the PendingToClose
state.
This happens regardless if aggregation_threshold
or unrealized_balance_ratio
thresholds are met on that
channel. If the aggregation on-close fails, the tickets are automatically sent for redeeming instead.
Default is true.
Trait Implementations§
Source§impl Clone for AggregatingStrategyConfig
impl Clone for AggregatingStrategyConfig
Source§fn clone(&self) -> AggregatingStrategyConfig
fn clone(&self) -> AggregatingStrategyConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AggregatingStrategyConfig
impl Debug for AggregatingStrategyConfig
Source§impl Default for AggregatingStrategyConfig
impl Default for AggregatingStrategyConfig
Source§impl<'de> Deserialize<'de> for AggregatingStrategyConfig
impl<'de> Deserialize<'de> for AggregatingStrategyConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<AggregatingStrategyConfig> for AggregationPrerequisites
impl From<AggregatingStrategyConfig> for AggregationPrerequisites
Source§fn from(value: AggregatingStrategyConfig) -> Self
fn from(value: AggregatingStrategyConfig) -> Self
Source§impl Validate for AggregatingStrategyConfig
impl Validate for AggregatingStrategyConfig
Source§impl<'v_a> ValidateArgs<'v_a> for AggregatingStrategyConfig
impl<'v_a> ValidateArgs<'v_a> for AggregatingStrategyConfig
impl Copy for AggregatingStrategyConfig
impl StructuralPartialEq for AggregatingStrategyConfig
Auto Trait Implementations§
impl Freeze for AggregatingStrategyConfig
impl RefUnwindSafe for AggregatingStrategyConfig
impl Send for AggregatingStrategyConfig
impl Sync for AggregatingStrategyConfig
impl Unpin for AggregatingStrategyConfig
impl UnwindSafe for AggregatingStrategyConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more