tendermint/abci/response/
set_option.rs1use crate::abci::Code;
2use crate::prelude::*;
3
4#[doc = include_str!("../doc/response-setoption.md")]
5#[derive(Clone, PartialEq, Eq, Debug)]
6pub struct SetOption {
7 pub code: Code,
8 pub log: String,
9 pub info: String,
10}
11
12use tendermint_proto::v0_34::abci as pb;
19use tendermint_proto::Protobuf;
20
21impl From<SetOption> for pb::ResponseSetOption {
22 fn from(message: SetOption) -> Self {
23 Self {
24 code: message.code.into(),
25 log: message.log,
26 info: message.info,
27 }
28 }
29}
30
31impl TryFrom<pb::ResponseSetOption> for SetOption {
32 type Error = crate::Error;
33
34 fn try_from(message: pb::ResponseSetOption) -> Result<Self, Self::Error> {
35 Ok(Self {
36 code: message.code.into(),
37 log: message.log,
38 info: message.info,
39 })
40 }
41}
42
43impl Protobuf<pb::ResponseSetOption> for SetOption {}