Copyright | Aleksandr Krupenkin 2016-2024 |
---|---|
License | Apache-2.0 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Network.Polkadot.Metadata.Type.Parser
Description
This module parse and cleanup raw types given from runtime, drop traits, generics, etc.
Documentation
fromText :: Text -> Either ParseError TypeAst Source #
Parse metadata type (general Rust type) from text.
fromTextM :: MonadFail m => Text -> m TypeAst Source #
This variant of fromText
fails when error happens.
toText :: TypeAst -> Text Source #
Render Metadata type to text.
This function strongly sanitize type identifiers and paths, removes generics and other Rust related staff.