Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.Api.TextView
Contents
Synopsis
- data TextView = TextView {}
- data TextViewError
- newtype TextViewType = TextViewType {}
- newtype TextViewDescription = TextViewDescription {}
- renderTextViewError :: TextViewError -> Text
- expectTextViewOfType :: TextViewType -> TextView -> Either TextViewError ()
- textViewJSONConfig :: Config
- textViewJSONKeyOrder :: Text -> Text -> Ordering
- textShow :: Show a => a -> Text
- data TextViewFileError
- renderTextViewFileError :: TextViewFileError -> Text
"TextView" format
A TextView
is a structured envelope for serialised binary values
with an external format with a semi-readable textual format.
It contains a "type" field, e.g. "PublicKeyByron" or "TxSignedShelley" to indicate the type of the encoded data. This is used as a sanity check and to help readers.
It also contains a "title" field which is free-form, and could be used to indicate the role or purpose to a reader.
Constructors
TextView | |
Fields |
data TextViewError Source #
The errors that the pure TextView
parsing/decoding functions can return.
Constructors
TextViewFormatError !Text | |
TextViewTypeError ![TextViewType] !TextViewType | expected, actual |
TextViewDecodeError !DecoderError | |
TextViewAesonDecodeError !String |
Instances
Eq TextViewError Source # | |
Defined in Cardano.Api.TextView Methods (==) :: TextViewError -> TextViewError -> Bool # (/=) :: TextViewError -> TextViewError -> Bool # | |
Show TextViewError Source # | |
Defined in Cardano.Api.TextView Methods showsPrec :: Int -> TextViewError -> ShowS # show :: TextViewError -> String # showList :: [TextViewError] -> ShowS # | |
Error TextViewError Source # | |
Defined in Cardano.Api.Typed Methods displayError :: TextViewError -> String Source # |
newtype TextViewType Source #
Constructors
TextViewType | |
Fields |
Instances
Eq TextViewType Source # | |
Defined in Cardano.Api.TextView | |
Show TextViewType Source # | |
Defined in Cardano.Api.TextView Methods showsPrec :: Int -> TextViewType -> ShowS # show :: TextViewType -> String # showList :: [TextViewType] -> ShowS # | |
IsString TextViewType Source # | |
Defined in Cardano.Api.TextView Methods fromString :: String -> TextViewType # | |
Semigroup TextViewType Source # | |
Defined in Cardano.Api.TextView Methods (<>) :: TextViewType -> TextViewType -> TextViewType # sconcat :: NonEmpty TextViewType -> TextViewType # stimes :: Integral b => b -> TextViewType -> TextViewType # |
newtype TextViewDescription Source #
Constructors
TextViewDescription | |
Fields |
Instances
Eq TextViewDescription Source # | |
Defined in Cardano.Api.TextView Methods (==) :: TextViewDescription -> TextViewDescription -> Bool # (/=) :: TextViewDescription -> TextViewDescription -> Bool # | |
Show TextViewDescription Source # | |
Defined in Cardano.Api.TextView Methods showsPrec :: Int -> TextViewDescription -> ShowS # show :: TextViewDescription -> String # showList :: [TextViewDescription] -> ShowS # | |
IsString TextViewDescription Source # | |
Defined in Cardano.Api.TextView Methods fromString :: String -> TextViewDescription # | |
Semigroup TextViewDescription Source # | |
Defined in Cardano.Api.TextView Methods (<>) :: TextViewDescription -> TextViewDescription -> TextViewDescription # sconcat :: NonEmpty TextViewDescription -> TextViewDescription # stimes :: Integral b => b -> TextViewDescription -> TextViewDescription # |
expectTextViewOfType :: TextViewType -> TextView -> Either TextViewError () Source #
Check that the "type" of the TextView
is as expected.
For example, one might check that the type is "TxSignedShelley".
File IO support
data TextViewFileError Source #
The errors that the IO TextView
reading/decoding actions can return.
Constructors
TextViewFileError !FilePath !TextViewError | |
TextViewFileIOError !FilePath !IOException |
Instances
Eq TextViewFileError Source # | |
Defined in Cardano.Api.TextView Methods (==) :: TextViewFileError -> TextViewFileError -> Bool # (/=) :: TextViewFileError -> TextViewFileError -> Bool # | |
Show TextViewFileError Source # | |
Defined in Cardano.Api.TextView Methods showsPrec :: Int -> TextViewFileError -> ShowS # show :: TextViewFileError -> String # showList :: [TextViewFileError] -> ShowS # |