pub struct AutoFundingStrategy<A: ChannelActions> { /* private fields */ }
Expand description
The AutoFundingStrategy
automatically funds a channel that
dropped it’s staked balance below the configured threshold.
Implementations§
Source§impl<A: ChannelActions> AutoFundingStrategy<A>
impl<A: ChannelActions> AutoFundingStrategy<A>
pub fn new(cfg: AutoFundingStrategyConfig, hopr_chain_actions: A) -> Self
Trait Implementations§
Source§impl<A: ChannelActions> Debug for AutoFundingStrategy<A>
impl<A: ChannelActions> Debug for AutoFundingStrategy<A>
Source§impl<A: ChannelActions> Display for AutoFundingStrategy<A>
impl<A: ChannelActions> Display for AutoFundingStrategy<A>
Source§impl<A: ChannelActions + Send + Sync> SingularStrategy for AutoFundingStrategy<A>
impl<A: ChannelActions + Send + Sync> SingularStrategy for AutoFundingStrategy<A>
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_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).
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<A> Freeze for AutoFundingStrategy<A>where
A: Freeze,
impl<A> RefUnwindSafe for AutoFundingStrategy<A>where
A: RefUnwindSafe,
impl<A> Send for AutoFundingStrategy<A>where
A: Send,
impl<A> Sync for AutoFundingStrategy<A>where
A: Sync,
impl<A> Unpin for AutoFundingStrategy<A>where
A: Unpin,
impl<A> UnwindSafe for AutoFundingStrategy<A>where
A: UnwindSafe,
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