tendermint/abci/request/
deliver_tx.rs1use bytes::Bytes;
2
3use crate::prelude::*;
4
5#[doc = include_str!("../doc/request-delivertx.md")]
6#[derive(Clone, PartialEq, Eq, Debug)]
7pub struct DeliverTx {
8 pub tx: Bytes,
10}
11
12mod v0_34 {
17 use super::DeliverTx;
18 use tendermint_proto::v0_34 as pb;
19 use tendermint_proto::Protobuf;
20
21 impl From<DeliverTx> for pb::abci::RequestDeliverTx {
22 fn from(deliver_tx: DeliverTx) -> Self {
23 Self { tx: deliver_tx.tx }
24 }
25 }
26
27 impl TryFrom<pb::abci::RequestDeliverTx> for DeliverTx {
28 type Error = crate::Error;
29
30 fn try_from(deliver_tx: pb::abci::RequestDeliverTx) -> Result<Self, Self::Error> {
31 Ok(Self { tx: deliver_tx.tx })
32 }
33 }
34
35 impl Protobuf<pb::abci::RequestDeliverTx> for DeliverTx {}
36}
37
38mod v0_37 {
39 use super::DeliverTx;
40 use tendermint_proto::v0_37 as pb;
41 use tendermint_proto::Protobuf;
42
43 impl From<DeliverTx> for pb::abci::RequestDeliverTx {
44 fn from(deliver_tx: DeliverTx) -> Self {
45 Self { tx: deliver_tx.tx }
46 }
47 }
48
49 impl TryFrom<pb::abci::RequestDeliverTx> for DeliverTx {
50 type Error = crate::Error;
51
52 fn try_from(deliver_tx: pb::abci::RequestDeliverTx) -> Result<Self, Self::Error> {
53 Ok(Self { tx: deliver_tx.tx })
54 }
55 }
56
57 impl Protobuf<pb::abci::RequestDeliverTx> for DeliverTx {}
58}