module Tendermint.Utils.QueryClient.Types where

import           Tendermint.SDK.BaseApp.Errors      (AppError)
import           Tendermint.SDK.BaseApp.Query.Types (QueryResult)

-- | Data is Nothing iff Raw includes a non-0 response value
data QueryClientResponse a =
    QueryResponse (QueryResult a)
  | QueryError AppError
  deriving (QueryClientResponse a -> QueryClientResponse a -> Bool
(QueryClientResponse a -> QueryClientResponse a -> Bool)
-> (QueryClientResponse a -> QueryClientResponse a -> Bool)
-> Eq (QueryClientResponse a)
forall a.
Eq a =>
QueryClientResponse a -> QueryClientResponse a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QueryClientResponse a -> QueryClientResponse a -> Bool
$c/= :: forall a.
Eq a =>
QueryClientResponse a -> QueryClientResponse a -> Bool
== :: QueryClientResponse a -> QueryClientResponse a -> Bool
$c== :: forall a.
Eq a =>
QueryClientResponse a -> QueryClientResponse a -> Bool
Eq, Int -> QueryClientResponse a -> ShowS
[QueryClientResponse a] -> ShowS
QueryClientResponse a -> String
(Int -> QueryClientResponse a -> ShowS)
-> (QueryClientResponse a -> String)
-> ([QueryClientResponse a] -> ShowS)
-> Show (QueryClientResponse a)
forall a. Show a => Int -> QueryClientResponse a -> ShowS
forall a. Show a => [QueryClientResponse a] -> ShowS
forall a. Show a => QueryClientResponse a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [QueryClientResponse a] -> ShowS
$cshowList :: forall a. Show a => [QueryClientResponse a] -> ShowS
show :: QueryClientResponse a -> String
$cshow :: forall a. Show a => QueryClientResponse a -> String
showsPrec :: Int -> QueryClientResponse a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> QueryClientResponse a -> ShowS
Show)