tendermint/abci/response/
extend_vote.rs

1use bytes::Bytes;
2
3#[doc = include_str!("../doc/response-extendvote.md")]
4#[derive(Clone, Debug, PartialEq, Eq)]
5pub struct ExtendVote {
6    pub vote_extension: Bytes,
7}
8
9// =============================================================================
10// Protobuf conversions
11// =============================================================================
12
13mod v0_38 {
14    use super::ExtendVote;
15    use tendermint_proto::v0_38::abci as pb;
16    use tendermint_proto::Protobuf;
17
18    impl From<ExtendVote> for pb::ResponseExtendVote {
19        fn from(value: ExtendVote) -> Self {
20            Self {
21                vote_extension: value.vote_extension,
22            }
23        }
24    }
25
26    impl TryFrom<pb::ResponseExtendVote> for ExtendVote {
27        type Error = crate::Error;
28
29        fn try_from(message: pb::ResponseExtendVote) -> Result<Self, Self::Error> {
30            Ok(Self {
31                vote_extension: message.vote_extension,
32            })
33        }
34    }
35
36    impl Protobuf<pb::ResponseExtendVote> for ExtendVote {}
37}