penumbra_sdk_ibc/component/
msg_handler.rs

1mod acknowledgement;
2mod channel_close_confirm;
3mod channel_close_init;
4mod channel_open_ack;
5mod channel_open_confirm;
6mod channel_open_init;
7mod channel_open_try;
8mod connection_open_ack;
9mod connection_open_confirm;
10mod connection_open_init;
11mod connection_open_try;
12mod create_client;
13mod misbehavior;
14mod recv_packet;
15mod timeout;
16mod update_client;
17mod upgrade_client;
18
19use crate::component::app_handler::{AppHandlerCheck, AppHandlerExecute};
20use anyhow::Result;
21use async_trait::async_trait;
22use cnidarium::StateWrite;
23
24use super::HostInterface;
25
26/// Variant of ActionHandler defined locally (so it can be implemented for IBC
27/// message types) and tweaked (removing the separate check_stateless step).
28#[async_trait]
29pub(crate) trait MsgHandler {
30    async fn check_stateless<AH: AppHandlerCheck>(&self) -> Result<()>;
31    async fn try_execute<
32        S: StateWrite,
33        AH: AppHandlerCheck + AppHandlerExecute,
34        HI: HostInterface,
35    >(
36        &self,
37        state: S,
38    ) -> Result<()>;
39}