capnp-0.17.0.0: Cap'n Proto for Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Capnp.Basics

Description

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

Documentation

data Text Source #

The Cap'n Proto Text type.

Instances

Instances details
Allocate Text Source # 
Instance details

Defined in Capnp.Basics

Associated Types

type AllocHint Text Source #

Methods

new :: RWCtx m s => AllocHint Text -> Message ('Mut s) -> m (Raw Text ('Mut s)) Source #

AllocateList Text Source # 
Instance details

Defined in Capnp.Basics

Associated Types

type ListAllocHint Text Source #

Methods

newList :: RWCtx m s => ListAllocHint Text -> Message ('Mut s) -> m (Raw (List Text) ('Mut s)) Source #

EstimateListAlloc Text Text Source # 
Instance details

Defined in Capnp.Basics

Parse Text Text Source # 
Instance details

Defined in Capnp.Basics

Methods

parse :: ReadCtx m 'Const => Raw Text 'Const -> m Text0 Source #

encode :: RWCtx m s => Message ('Mut s) -> Text0 -> m (Raw Text ('Mut s)) Source #

HasField "displayName" 'Slot Node Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

HasField "docComment" 'Slot Node'SourceInfo Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

HasField "docComment" 'Slot Node'SourceInfo'Member Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

HasField "filename" 'Slot CodeGeneratorRequest'RequestedFile Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

HasField "function" 'Slot Value'Call Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Compat.Json

HasField "name" 'Slot DiscriminatorOptions Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Compat.Json

HasField "name" 'Slot Value'Field Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Compat.Json

HasField "name" 'Slot CodeGeneratorRequest'RequestedFile'Import Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

HasField "name" 'Slot Enumerant Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

HasField "name" 'Slot Field Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

HasField "name" 'Slot Method Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

HasField "name" 'Slot Node'NestedNode Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

HasField "name" 'Slot Node'Parameter Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

HasField "prefix" 'Slot FlattenOptions Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Compat.Json

HasField "reason" 'Slot Exception Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Rpc

HasField "valueName" 'Slot DiscriminatorOptions Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Compat.Json

HasVariant "string" 'Slot Value Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Compat.Json

HasVariant "text" 'Slot Value Text Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

type AllocHint Text Source # 
Instance details

Defined in Capnp.Basics

type ListAllocHint Text Source # 
Instance details

Defined in Capnp.Basics

type ReprFor Text Source # 
Instance details

Defined in Capnp.Basics

data Data Source #

The Cap'n Proto Data type.

Instances

Instances details
Allocate Data Source # 
Instance details

Defined in Capnp.Basics

Associated Types

type AllocHint Data Source #

Methods

new :: RWCtx m s => AllocHint Data -> Message ('Mut s) -> m (Raw Data ('Mut s)) Source #

AllocateList Data Source # 
Instance details

Defined in Capnp.Basics

Associated Types

type ListAllocHint Data Source #

Methods

newList :: RWCtx m s => ListAllocHint Data -> Message ('Mut s) -> m (Raw (List Data) ('Mut s)) Source #

EstimateAlloc Data ByteString Source # 
Instance details

Defined in Capnp.Basics

EstimateListAlloc Data ByteString Source # 
Instance details

Defined in Capnp.Basics

Marshal Data ByteString Source # 
Instance details

Defined in Capnp.Basics

Methods

marshalInto :: RWCtx m s => Raw Data ('Mut s) -> ByteString -> m () Source #

Parse Data ByteString Source # 
Instance details

Defined in Capnp.Basics

Methods

parse :: ReadCtx m 'Const => Raw Data 'Const -> m ByteString Source #

encode :: RWCtx m s => Message ('Mut s) -> ByteString -> m (Raw Data ('Mut s)) Source #

HasVariant "data_" 'Slot Value Data Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

type AllocHint Data Source # 
Instance details

Defined in Capnp.Basics

type ListAllocHint Data Source # 
Instance details

Defined in Capnp.Basics

type ReprFor Data Source # 
Instance details

Defined in Capnp.Basics

data AnyPointer Source #

A Cap'n Proto AnyPointer, i.e. an arbitrary pointer with unknown schema.

Instances

Instances details
AllocateList AnyPointer Source # 
Instance details

Defined in Capnp.Basics

Associated Types

type ListAllocHint AnyPointer Source #

Methods

newList :: RWCtx m s => ListAllocHint AnyPointer -> Message ('Mut s) -> m (Raw (List AnyPointer) ('Mut s)) Source #

HasField "cap" 'Slot JoinResult (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Gen.Capnp.RpcTwoparty

HasField "content" 'Slot Payload (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Gen.Capnp.Rpc

HasField "deprecatedObjectId" 'Slot Bootstrap (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Gen.Capnp.Rpc

HasField "id" 'Slot ThirdPartyCapDescriptor (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Gen.Capnp.Rpc

HasField "keyPart" 'Slot Join (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Gen.Capnp.Rpc

HasField "provision" 'Slot Accept (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Gen.Capnp.Rpc

HasField "recipient" 'Slot Provide (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Gen.Capnp.Rpc

HasVariant "acceptFromThirdParty" 'Slot Return (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Gen.Capnp.Rpc

HasVariant "anyPointer" 'Slot Value (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

HasVariant "list" 'Slot Value (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

HasVariant "obsoleteDelete" 'Slot Message (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Gen.Capnp.Rpc

HasVariant "obsoleteSave" 'Slot Message (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Gen.Capnp.Rpc

HasVariant "struct" 'Slot Value (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Gen.Capnp.Schema

HasVariant "thirdParty" 'Slot Call'sendResultsTo (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Gen.Capnp.Rpc

EstimateListAlloc AnyPointer (Parsed AnyPointer) Source # 
Instance details

Defined in Capnp.Basics

Parse AnyPointer (Parsed AnyPointer) Source # 
Instance details

Defined in Capnp.Basics

Generic (Parsed AnyPointer) Source # 
Instance details

Defined in Capnp.Basics

Associated Types

type Rep (Parsed AnyPointer) :: Type -> Type #

Show (Parsed AnyPointer) Source # 
Instance details

Defined in Capnp.Basics

AllocateList (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Basics

Associated Types

type ListAllocHint (Maybe AnyPointer) Source #

Methods

newList :: RWCtx m s => ListAllocHint (Maybe AnyPointer) -> Message ('Mut s) -> m (Raw (List (Maybe AnyPointer)) ('Mut s)) Source #

Eq (Parsed AnyPointer) Source # 
Instance details

Defined in Capnp.Basics

EstimateListAlloc (Maybe AnyPointer) (Maybe (Parsed AnyPointer)) Source # 
Instance details

Defined in Capnp.Basics

Parse (Maybe AnyPointer) (Maybe (Parsed AnyPointer)) Source # 
Instance details

Defined in Capnp.Basics

type ListAllocHint AnyPointer Source # 
Instance details

Defined in Capnp.Basics

data Parsed AnyPointer Source # 
Instance details

Defined in Capnp.Basics

type ReprFor AnyPointer Source # 
Instance details

Defined in Capnp.Basics

type Rep (Parsed AnyPointer) Source # 
Instance details

Defined in Capnp.Basics

type ListAllocHint (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Basics

type ReprFor (Maybe AnyPointer) Source # 
Instance details

Defined in Capnp.Basics

data AnyList Source #

A Cap'n Proto List with unknown element type.

Instances

Instances details
Parse AnyList (Parsed AnyList) Source # 
Instance details

Defined in Capnp.Basics

Methods

parse :: ReadCtx m 'Const => Raw AnyList 'Const -> m (Parsed AnyList) Source #

encode :: RWCtx m s => Message ('Mut s) -> Parsed AnyList -> m (Raw AnyList ('Mut s)) Source #

Generic (Parsed AnyList) Source # 
Instance details

Defined in Capnp.Basics

Associated Types

type Rep (Parsed AnyList) :: Type -> Type #

Show (Parsed AnyList) Source # 
Instance details

Defined in Capnp.Basics

Eq (Parsed AnyList) Source # 
Instance details

Defined in Capnp.Basics

data Parsed AnyList Source # 
Instance details

Defined in Capnp.Basics

type ReprFor AnyList Source # 
Instance details

Defined in Capnp.Basics

type Rep (Parsed AnyList) Source # 
Instance details

Defined in Capnp.Basics

type Rep (Parsed AnyList) = D1 ('MetaData "Parsed" "Capnp.Basics" "capnp-0.17.0.0-KnW61yXmCDxBdeB4uIxK8L" 'False) (((C1 ('MetaCons "ListPtr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ParsedList (Maybe (Parsed AnyPointer))))) :+: C1 ('MetaCons "ListStruct" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ParsedList (Parsed AnyStruct))))) :+: (C1 ('MetaCons "List0" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ParsedList ()))) :+: C1 ('MetaCons "List1" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ParsedList Bool))))) :+: ((C1 ('MetaCons "List8" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ParsedList Word8))) :+: C1 ('MetaCons "List16" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ParsedList Word16)))) :+: (C1 ('MetaCons "List32" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ParsedList Word32))) :+: C1 ('MetaCons "List64" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ParsedList Word64))))))

data AnyStruct Source #

A Cap'n Proto struct of unknown type.

Instances

Instances details
Allocate AnyStruct Source # 
Instance details

Defined in Capnp.Basics

Associated Types

type AllocHint AnyStruct Source #

Methods

new :: RWCtx m s => AllocHint AnyStruct -> Message ('Mut s) -> m (Raw AnyStruct ('Mut s)) Source #

AllocateList AnyStruct Source # 
Instance details

Defined in Capnp.Basics

Associated Types

type ListAllocHint AnyStruct Source #

Methods

newList :: RWCtx m s => ListAllocHint AnyStruct -> Message ('Mut s) -> m (Raw (List AnyStruct) ('Mut s)) Source #

EstimateAlloc AnyStruct (Parsed AnyStruct) Source # 
Instance details

Defined in Capnp.Basics

EstimateListAlloc AnyStruct (Parsed AnyStruct) Source # 
Instance details

Defined in Capnp.Basics

Marshal AnyStruct (Parsed AnyStruct) Source # 
Instance details

Defined in Capnp.Basics

Methods

marshalInto :: RWCtx m s => Raw AnyStruct ('Mut s) -> Parsed AnyStruct -> m () Source #

Parse AnyStruct (Parsed AnyStruct) Source # 
Instance details

Defined in Capnp.Basics

Generic (Parsed AnyStruct) Source # 
Instance details

Defined in Capnp.Basics

Associated Types

type Rep (Parsed AnyStruct) :: Type -> Type #

Show (Parsed AnyStruct) Source # 
Instance details

Defined in Capnp.Basics

Eq (Parsed AnyStruct) Source # 
Instance details

Defined in Capnp.Basics

type AllocHint AnyStruct Source # 
Instance details

Defined in Capnp.Basics

type ListAllocHint AnyStruct Source # 
Instance details

Defined in Capnp.Basics

data Parsed AnyStruct Source # 
Instance details

Defined in Capnp.Basics

type ReprFor AnyStruct Source # 
Instance details

Defined in Capnp.Basics

type Rep (Parsed AnyStruct) Source # 
Instance details

Defined in Capnp.Basics

type Rep (Parsed AnyStruct) = D1 ('MetaData "Parsed" "Capnp.Basics" "capnp-0.17.0.0-KnW61yXmCDxBdeB4uIxK8L" 'False) (C1 ('MetaCons "Struct" 'PrefixI 'True) (S1 ('MetaSel ('Just "structData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Word64)) :*: S1 ('MetaSel ('Just "structPtrs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector (Maybe (Parsed AnyPointer))))))

data Capability Source #

A Cap'n Proto capability with unknown interfaces.

Instances

Instances details
Parse Capability Client Source # 
Instance details

Defined in Capnp.Basics

Methods

parse :: ReadCtx m 'Const => Raw Capability 'Const -> m Client Source #

encode :: RWCtx m s => Message ('Mut s) -> Client -> m (Raw Capability ('Mut s)) Source #

type ReprFor Capability Source # 
Instance details

Defined in Capnp.Basics

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).

Orphan instances

Parse Capability Client Source # 
Instance details

Methods

parse :: ReadCtx m 'Const => Raw Capability 'Const -> m Client Source #

encode :: RWCtx m s => Message ('Mut s) -> Client -> m (Raw Capability ('Mut s)) Source #

Parse Data ByteString Source # 
Instance details

Methods

parse :: ReadCtx m 'Const => Raw Data 'Const -> m ByteString Source #

encode :: RWCtx m s => Message ('Mut s) -> ByteString -> m (Raw Data ('Mut s)) Source #

Parse Text Text Source # 
Instance details

Methods

parse :: ReadCtx m 'Const => Raw Text 'Const -> m Text0 Source #

encode :: RWCtx m s => Message ('Mut s) -> Text0 -> m (Raw Text ('Mut s)) Source #