Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module contains phantom types for built-in Cap'n Proto types, analogous to the phantom types generated for structs by the code generator. It also defines applicable type class instances.
Synopsis
- data Text
- data Data
- data AnyPointer
- data AnyList
- data AnyStruct
- data Capability
- type ParsedList a = Vector a
- textBuffer :: MonadThrow m => Raw Text mut -> m (Raw Data mut)
- textBytes :: ReadCtx m 'Const => Raw Text 'Const -> m ByteString
Documentation
The Cap'n Proto Text
type.
Instances
The Cap'n Proto Data
type.
Instances
Allocate Data Source # | |
AllocateList Data Source # | |
EstimateAlloc Data ByteString Source # | |
Defined in Capnp.Basics estimateAlloc :: ByteString -> AllocHint Data Source # | |
EstimateListAlloc Data ByteString Source # | |
Defined in Capnp.Basics estimateListAlloc :: Vector ByteString -> AllocHint (List Data) Source # | |
Marshal Data ByteString Source # | |
Defined in Capnp.Basics marshalInto :: RWCtx m s => Raw Data ('Mut s) -> ByteString -> m () Source # | |
Parse Data ByteString Source # | |
HasVariant "data_" 'Slot Value Data Source # | |
Defined in Capnp.Gen.Capnp.Schema | |
type AllocHint Data Source # | |
Defined in Capnp.Basics | |
type ListAllocHint Data Source # | |
Defined in Capnp.Basics | |
type ReprFor Data Source # | |
data AnyPointer Source #
A Cap'n Proto AnyPointer
, i.e. an arbitrary pointer with unknown schema.
Instances
A Cap'n Proto List
with unknown element type.
Instances
A Cap'n Proto struct of unknown type.
Instances
data Capability Source #
A Cap'n Proto capability with unknown interfaces.
Instances
Parse Capability Client Source # | |
type ReprFor Capability Source # | |
Defined in Capnp.Basics |
type ParsedList a = Vector a Source #
textBuffer :: MonadThrow m => Raw Text mut -> m (Raw Data mut) Source #
Return the underlying buffer containing the text. This does not include the null terminator.
textBytes :: ReadCtx m 'Const => Raw Text 'Const -> m ByteString Source #
Convert a Text
to a ByteString
, comprising the raw bytes of the text
(not counting the NUL terminator).