pub struct AggregatingStrategy<Db>{ /* private fields */ }
Expand description
Represents a strategy that starts aggregating tickets in a certain channel, once the number of acknowledged tickets in that channel goes above the given threshold. Optionally, the strategy can also redeem the aggregated ticket, if the aggregation was successful.
Implementations§
Trait Implementations§
Source§impl<Db> Debug for AggregatingStrategy<Db>
impl<Db> Debug for AggregatingStrategy<Db>
Source§impl<Db> Display for AggregatingStrategy<Db>
impl<Db> Display for AggregatingStrategy<Db>
Source§impl<Db> SingularStrategy for AggregatingStrategy<Db>
impl<Db> SingularStrategy for AggregatingStrategy<Db>
Source§fn on_tick<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_tick<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Strategy event raised at period intervals (typically each 1 minute).
Source§fn on_own_channel_changed<'life0, 'life1, 'async_trait>(
&'life0 self,
channel: &'life1 ChannelEntry,
direction: ChannelDirection,
change: ChannelChange,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_own_channel_changed<'life0, 'life1, 'async_trait>(
&'life0 self,
channel: &'life1 ChannelEntry,
direction: ChannelDirection,
change: ChannelChange,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Strategy event raised whenever the Indexer registers a change on node’s own channel.
Source§fn on_acknowledged_winning_ticket<'life0, 'life1, 'async_trait>(
&'life0 self,
_ack: &'life1 AcknowledgedTicket,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_acknowledged_winning_ticket<'life0, 'life1, 'async_trait>(
&'life0 self,
_ack: &'life1 AcknowledgedTicket,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Strategy event raised when a new winning acknowledged ticket is received in a channel
Auto Trait Implementations§
impl<Db> Freeze for AggregatingStrategy<Db>where
Db: Freeze,
impl<Db> !RefUnwindSafe for AggregatingStrategy<Db>
impl<Db> Send for AggregatingStrategy<Db>
impl<Db> Sync for AggregatingStrategy<Db>
impl<Db> Unpin for AggregatingStrategy<Db>where
Db: Unpin,
impl<Db> !UnwindSafe for AggregatingStrategy<Db>
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
Mutably borrows from an owned value. Read more
§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>
Converts
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>
Converts
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.
§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP