web3-0.9.1.0: Web3 API for Haskell.

CopyrightAlexander Krupenkin 2016
LicenseBSD3
Maintainermail@akru.me
Stabilityexperimental
Portabilitynoportable
Safe HaskellNone
LanguageHaskell2010

Codec.Scale.SingletonEnum

Description

This type helps to encode/decode singleton Rust enums like: `enum Enum { Data { some_data: u32 } }`

Synopsis

Documentation

newtype SingletonEnum a Source #

Haskell don't permit to make Rust-like enum type with only one element. For this reason it is impossible to make generic parser for singleton enum type. This type helps to parse Rust encoded singleton enums.

Constructors

SingletonEnum 

Fields

Instances
Decode a => Decode (SingletonEnum a) Source # 
Instance details

Defined in Codec.Scale.SingletonEnum

Methods

get :: Get (SingletonEnum a) Source #

Encode a => Encode (SingletonEnum a) Source # 
Instance details

Defined in Codec.Scale.SingletonEnum