Trait MiddlewareModule

Source
pub trait MiddlewareModule {
    type NextMiddleware: Module;

Show 19 methods // Required methods fn next_middleware(&self) -> &Self::NextMiddleware; fn next_middleware_mut(&mut self) -> &mut Self::NextMiddleware; // Provided methods fn middleware_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 middleware_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 middleware_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 middleware_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 middleware_on_chan_open_ack_validate( &self, port_id: &PortId, channel_id: &ChannelId, counterparty_version: &Version, ) -> Result<(), ChannelError> { ... } fn middleware_on_chan_open_ack_execute( &mut self, port_id: &PortId, channel_id: &ChannelId, counterparty_version: &Version, ) -> Result<ModuleExtras, ChannelError> { ... } fn middleware_on_chan_open_confirm_validate( &self, port_id: &PortId, channel_id: &ChannelId, ) -> Result<(), ChannelError> { ... } fn middleware_on_chan_open_confirm_execute( &mut self, port_id: &PortId, channel_id: &ChannelId, ) -> Result<ModuleExtras, ChannelError> { ... } fn middleware_on_chan_close_init_validate( &self, port_id: &PortId, channel_id: &ChannelId, ) -> Result<(), ChannelError> { ... } fn middleware_on_chan_close_init_execute( &mut self, port_id: &PortId, channel_id: &ChannelId, ) -> Result<ModuleExtras, ChannelError> { ... } fn middleware_on_chan_close_confirm_validate( &self, port_id: &PortId, channel_id: &ChannelId, ) -> Result<(), ChannelError> { ... } fn middleware_on_chan_close_confirm_execute( &mut self, port_id: &PortId, channel_id: &ChannelId, ) -> Result<ModuleExtras, ChannelError> { ... } fn middleware_on_recv_packet_execute( &mut self, packet: &Packet, relayer: &Signer, ) -> (ModuleExtras, Option<Acknowledgement>) { ... } fn middleware_on_acknowledgement_packet_validate( &self, packet: &Packet, acknowledgement: &Acknowledgement, relayer: &Signer, ) -> Result<(), ChannelError> { ... } fn middleware_on_acknowledgement_packet_execute( &mut self, packet: &Packet, acknowledgement: &Acknowledgement, relayer: &Signer, ) -> (ModuleExtras, Result<(), ChannelError>) { ... } fn middleware_on_timeout_packet_validate( &self, packet: &Packet, relayer: &Signer, ) -> Result<(), ChannelError> { ... } fn middleware_on_timeout_packet_execute( &mut self, packet: &Packet, relayer: &Signer, ) -> (ModuleExtras, Result<(), ChannelError>) { ... }
}

Required Associated Types§

Required Methods§

Source

fn next_middleware(&self) -> &Self::NextMiddleware

Source

fn next_middleware_mut(&mut self) -> &mut Self::NextMiddleware

Provided Methods§

Source

fn middleware_on_chan_open_init_validate( &self, order: Order, connection_hops: &[ConnectionId], port_id: &PortId, channel_id: &ChannelId, counterparty: &Counterparty, version: &Version, ) -> Result<Version, ChannelError>

Source

fn middleware_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>

Source

fn middleware_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>

Source

fn middleware_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>

Source

fn middleware_on_chan_open_ack_validate( &self, port_id: &PortId, channel_id: &ChannelId, counterparty_version: &Version, ) -> Result<(), ChannelError>

Source

fn middleware_on_chan_open_ack_execute( &mut self, port_id: &PortId, channel_id: &ChannelId, counterparty_version: &Version, ) -> Result<ModuleExtras, ChannelError>

Source

fn middleware_on_chan_open_confirm_validate( &self, port_id: &PortId, channel_id: &ChannelId, ) -> Result<(), ChannelError>

Source

fn middleware_on_chan_open_confirm_execute( &mut self, port_id: &PortId, channel_id: &ChannelId, ) -> Result<ModuleExtras, ChannelError>

Source

fn middleware_on_chan_close_init_validate( &self, port_id: &PortId, channel_id: &ChannelId, ) -> Result<(), ChannelError>

Source

fn middleware_on_chan_close_init_execute( &mut self, port_id: &PortId, channel_id: &ChannelId, ) -> Result<ModuleExtras, ChannelError>

Source

fn middleware_on_chan_close_confirm_validate( &self, port_id: &PortId, channel_id: &ChannelId, ) -> Result<(), ChannelError>

Source

fn middleware_on_chan_close_confirm_execute( &mut self, port_id: &PortId, channel_id: &ChannelId, ) -> Result<ModuleExtras, ChannelError>

Source

fn middleware_on_recv_packet_execute( &mut self, packet: &Packet, relayer: &Signer, ) -> (ModuleExtras, Option<Acknowledgement>)

Source

fn middleware_on_acknowledgement_packet_validate( &self, packet: &Packet, acknowledgement: &Acknowledgement, relayer: &Signer, ) -> Result<(), ChannelError>

Source

fn middleware_on_acknowledgement_packet_execute( &mut self, packet: &Packet, acknowledgement: &Acknowledgement, relayer: &Signer, ) -> (ModuleExtras, Result<(), ChannelError>)

Source

fn middleware_on_timeout_packet_validate( &self, packet: &Packet, relayer: &Signer, ) -> Result<(), ChannelError>

Source

fn middleware_on_timeout_packet_execute( &mut self, packet: &Packet, relayer: &Signer, ) -> (ModuleExtras, Result<(), ChannelError>)

Implementors§