pub trait Module: Debug {
Show 17 methods
// Required methods
fn on_chan_open_init_validate(
&self,
order: Order,
connection_hops: &[ConnectionId],
port_id: &PortId,
channel_id: &ChannelId,
counterparty: &Counterparty,
version: &Version
) -> Result<Version, ChannelError>;
fn on_chan_open_init_execute(
&mut self,
order: Order,
connection_hops: &[ConnectionId],
port_id: &PortId,
channel_id: &ChannelId,
counterparty: &Counterparty,
version: &Version
) -> Result<(ModuleExtras, Version), ChannelError>;
fn on_chan_open_try_validate(
&self,
order: Order,
connection_hops: &[ConnectionId],
port_id: &PortId,
channel_id: &ChannelId,
counterparty: &Counterparty,
counterparty_version: &Version
) -> Result<Version, ChannelError>;
fn on_chan_open_try_execute(
&mut self,
order: Order,
connection_hops: &[ConnectionId],
port_id: &PortId,
channel_id: &ChannelId,
counterparty: &Counterparty,
counterparty_version: &Version
) -> Result<(ModuleExtras, Version), ChannelError>;
fn on_recv_packet_execute(
&mut self,
packet: &Packet,
relayer: &Signer
) -> (ModuleExtras, Acknowledgement);
fn on_acknowledgement_packet_validate(
&self,
_packet: &Packet,
_acknowledgement: &Acknowledgement,
_relayer: &Signer
) -> Result<(), PacketError>;
fn on_acknowledgement_packet_execute(
&mut self,
_packet: &Packet,
_acknowledgement: &Acknowledgement,
_relayer: &Signer
) -> (ModuleExtras, Result<(), PacketError>);
fn on_timeout_packet_validate(
&self,
packet: &Packet,
relayer: &Signer
) -> Result<(), PacketError>;
fn on_timeout_packet_execute(
&mut self,
packet: &Packet,
relayer: &Signer
) -> (ModuleExtras, Result<(), PacketError>);
// Provided methods
fn on_chan_open_ack_validate(
&self,
_port_id: &PortId,
_channel_id: &ChannelId,
_counterparty_version: &Version
) -> Result<(), ChannelError> { ... }
fn on_chan_open_ack_execute(
&mut self,
_port_id: &PortId,
_channel_id: &ChannelId,
_counterparty_version: &Version
) -> Result<ModuleExtras, ChannelError> { ... }
fn on_chan_open_confirm_validate(
&self,
_port_id: &PortId,
_channel_id: &ChannelId
) -> Result<(), ChannelError> { ... }
fn on_chan_open_confirm_execute(
&mut self,
_port_id: &PortId,
_channel_id: &ChannelId
) -> Result<ModuleExtras, ChannelError> { ... }
fn on_chan_close_init_validate(
&self,
_port_id: &PortId,
_channel_id: &ChannelId
) -> Result<(), ChannelError> { ... }
fn on_chan_close_init_execute(
&mut self,
_port_id: &PortId,
_channel_id: &ChannelId
) -> Result<ModuleExtras, ChannelError> { ... }
fn on_chan_close_confirm_validate(
&self,
_port_id: &PortId,
_channel_id: &ChannelId
) -> Result<(), ChannelError> { ... }
fn on_chan_close_confirm_execute(
&mut self,
_port_id: &PortId,
_channel_id: &ChannelId
) -> Result<ModuleExtras, ChannelError> { ... }
}
Required Methods§
fn on_chan_open_init_validate( &self, order: Order, connection_hops: &[ConnectionId], port_id: &PortId, channel_id: &ChannelId, counterparty: &Counterparty, version: &Version ) -> Result<Version, ChannelError>
fn on_chan_open_init_execute( &mut self, order: Order, connection_hops: &[ConnectionId], port_id: &PortId, channel_id: &ChannelId, counterparty: &Counterparty, version: &Version ) -> Result<(ModuleExtras, Version), ChannelError>
fn on_chan_open_try_validate( &self, order: Order, connection_hops: &[ConnectionId], port_id: &PortId, channel_id: &ChannelId, counterparty: &Counterparty, counterparty_version: &Version ) -> Result<Version, ChannelError>
fn on_chan_open_try_execute( &mut self, order: Order, connection_hops: &[ConnectionId], port_id: &PortId, channel_id: &ChannelId, counterparty: &Counterparty, counterparty_version: &Version ) -> Result<(ModuleExtras, Version), ChannelError>
fn on_recv_packet_execute( &mut self, packet: &Packet, relayer: &Signer ) -> (ModuleExtras, Acknowledgement)
fn on_acknowledgement_packet_validate( &self, _packet: &Packet, _acknowledgement: &Acknowledgement, _relayer: &Signer ) -> Result<(), PacketError>
fn on_acknowledgement_packet_execute( &mut self, _packet: &Packet, _acknowledgement: &Acknowledgement, _relayer: &Signer ) -> (ModuleExtras, Result<(), PacketError>)
sourcefn on_timeout_packet_validate(
&self,
packet: &Packet,
relayer: &Signer
) -> Result<(), PacketError>
fn on_timeout_packet_validate( &self, packet: &Packet, relayer: &Signer ) -> Result<(), PacketError>
Note: MsgTimeout
and MsgTimeoutOnClose
use the same callback
sourcefn on_timeout_packet_execute(
&mut self,
packet: &Packet,
relayer: &Signer
) -> (ModuleExtras, Result<(), PacketError>)
fn on_timeout_packet_execute( &mut self, packet: &Packet, relayer: &Signer ) -> (ModuleExtras, Result<(), PacketError>)
Note: MsgTimeout
and MsgTimeoutOnClose
use the same callback