cborg-0.2.10.0: Concise Binary Object Representation (CBOR)

Copyright | (c) Duncan Coutts 2015-2017
License | BSD3-style (see LICENSE.txt)
Maintainer | duncan@community.haskell.org
Stability | experimental
Portability | non-portable (GHC extensions)
Safe Haskell | None
Language | Haskell2010

Codec.CBOR.Write

Description

Functions for writing out CBOR `Encoding` values in a variety of forms.

Synopsis

- toBuilder :: Encoding -> Builder
- toLazyByteString :: Encoding -> ByteString
- toStrictByteString :: Encoding -> ByteString

# Documentation

toBuilder #

Arguments

:: Encoding | The `Encoding` of a CBOR value.
-> Builder | The encoded value as a `Builder`.

Turn an `Encoding` into a `ByteString` `Builder` in CBOR binary format.

Since: 0.2.0.0

toLazyByteString #

Arguments

:: Encoding | The `Encoding` of a CBOR value.
-> ByteString | The encoded CBOR value.

Turn an `Encoding` into a lazy `ByteString` in CBOR binary format.

Since: 0.2.0.0

toStrictByteString #

Arguments

:: Encoding | The `Encoding` of a CBOR value.
-> ByteString | The encoded value.

Turn an `Encoding` into a strict `ByteString` in CBOR binary format.

Since: 0.2.0.0