pub trait SingularStrategy: Display {
// Provided methods
fn on_tick<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: '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 { ... }
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: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}
Expand description
Basic single strategy.
Provided Methods§
Sourcefn on_tick<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn on_tick<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Strategy event raised at period intervals (typically each 1 minute).
Sourcefn 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
Sourcefn 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: Sync + '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: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Strategy event raised whenever the Indexer registers a change on node’s own channel.