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