Trait AbstractChannel

Source
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§

Source

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.

Source

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.

Source

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”.

Source

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”.

Source

fn engage_padding_activities(&self)

Specify that this channel should do activities related to channel padding

See Channel::engage_padding_activities

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.

Implementations on Foreign Types§

Source§

impl AbstractChannel for Channel

Source§

fn is_usable(&self) -> bool

Source§

fn duration_unused(&self) -> Option<Duration>

Source§

fn reparameterize( &self, updates: Arc<ChannelPaddingInstructionsUpdates>, ) -> Result<()>

Source§

fn reparameterize_kist(&self, kist_params: KistParams) -> Result<()>

Source§

fn engage_padding_activities(&self)

Implementors§