tendermint 0.40.4

Tendermint is a high-performance blockchain consensus engine that powers Byzantine fault tolerant applications written in any programming language. This crate provides core types for representing information about Tendermint blockchain networks, including chain information types, secret connections, and remote procedure calls (JSON-RPC).
Documentation
use crate::prelude::*;

#[doc = include_str!("../doc/response-exception.md")]
#[derive(Clone, PartialEq, Eq, Debug)]
pub struct Exception {
    /// Undocumented.
    pub error: String,
}

// =============================================================================
// Protobuf conversions
// =============================================================================

tendermint_pb_modules! {
    use super::Exception;

    impl From<Exception> for pb::abci::ResponseException {
        fn from(exception: Exception) -> Self {
            Self {
                error: exception.error,
            }
        }
    }

    impl TryFrom<pb::abci::ResponseException> for Exception {
        type Error = crate::Error;

        fn try_from(exception: pb::abci::ResponseException) -> Result<Self, Self::Error> {
            Ok(Self {
                error: exception.error,
            })
        }
    }

    impl Protobuf<pb::abci::ResponseException> for Exception {}
}