pub(crate) trait AbstractChannel: HasRelayIds {
// Required methods
fn is_usable(&self) -> bool;
fn duration_unused(&self) -> Option<Duration>;
fn reparameterize(
&self,
updates: Arc<ChannelPaddingInstructionsUpdates>,
) -> Result<()>;
fn reparameterize_kist(&self, kist_params: KistParams) -> Result<()>;
fn engage_padding_activities(&self);
}
Expand description
Trait to describe as much of a
Channel
as AbstractChanMgr
needs to use.
Required Methods§
Sourcefn is_usable(&self) -> bool
fn is_usable(&self) -> bool
Return true if this channel is usable.
A channel might be unusable because it is closed, because it has hit a bug, or for some other reason. We don’t return unusable channels back to the user.
Sourcefn duration_unused(&self) -> Option<Duration>
fn duration_unused(&self) -> Option<Duration>
Return the amount of time a channel has not been in use. Return None if the channel is currently in use.
Sourcefn reparameterize(
&self,
updates: Arc<ChannelPaddingInstructionsUpdates>,
) -> Result<()>
fn reparameterize( &self, updates: Arc<ChannelPaddingInstructionsUpdates>, ) -> Result<()>
Reparameterize this channel according to the provided ChannelPaddingInstructionsUpdates
The changed parameters may not be implemented “immediately”, but this will be done “reasonably soon”.
Sourcefn reparameterize_kist(&self, kist_params: KistParams) -> Result<()>
fn reparameterize_kist(&self, kist_params: KistParams) -> Result<()>
Update the KIST parameters.
The changed parameters may not be implemented “immediately”, but this will be done “reasonably soon”.
Sourcefn engage_padding_activities(&self)
fn engage_padding_activities(&self)
Specify that this channel should do activities related to channel padding
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.