Skip to main content

AbstractChannel

Trait AbstractChannel 

Source
pub(crate) trait AbstractChannel: HasRelayIds {
    // Required methods
    fn is_canonical(&self) -> bool;
    fn is_canonical_to_peer(&self) -> bool;
    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_canonical(&self) -> bool

Return true iff this channel is considered canonical by us.

Source

fn is_canonical_to_peer(&self) -> bool

Return true if we think the peer considers this channel as canonical.

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

Implementations on Foreign Types§

Source§

impl AbstractChannel for Channel

Implementors§