Swift API
294 declarations · 294 documented
NPRPC
-
BufferErrorstructBuffer operation error
-
check_optional_boundsfunctionCheck that an optional field has valid bounds Optionals have a 4-byte presence flag, followed by the relative data offset
-
check_string_boundsfunctionCheck that a string field has valid bounds Strings are stored like vectors of UInt8
-
check_struct_boundsfunctionCheck that a struct at the given offset fits within the buffer
-
check_vector_boundsfunctionCheck that a vector/string field has valid bounds The first 4 bytes at offset contain the relative data offset (from offset) The next 4 bytes contain the count
-
clearCookiefunctionRemove a cookie on the client side by sending
Max-Age=0. -
ConnectionErrorstructConnection-related error
-
CookieOptionsstructOptions controlling a
Set-Cookieresponse header. -
createByteStreamReaderfunctionHelper to create a byte stream reader (most common case)
-
createByteStreamYielderfunctionHelper to create a byte stream yielder (most common case)
-
createObjectBidiStreamfunctionBoth halves of a bidi stream opened through a proxy's object handle. Used by generated code.
-
createObjectStreamReaderfunctionA reader for stream
streamIdopened through a proxy's object handle. Used by generated code. -
createObjectStreamWriterfunctionA writer for stream
streamIdopened through a proxy's object handle. Used by generated code. -
createStreamManagerBidiStreamfunctionBoth halves of a bidi stream on a session's stream manager. Used by generated code.
-
createStreamManagerReaderfunctionA reader for stream
streamIdon a session's stream manager, granting credits back in batches of halfproducerWindow. Used by generated code. -
createStreamManagerWriterfunctionA writer for stream
streamIdon a session's stream manager, starting with the consumer's advertisedinitialCredits. Used by generated code. -
defaultReaderWindowvariableWindow a consumer advertises in StreamInit.initial_credits when opening a stream; refills are granted in batches of half this window.
-
EndPointstructNetwork endpoint identifying a remote NPRPC object
-
FlatBufferclassSwift wrapper for nprpc::flat_buffer Marked as @unchecked Sendable because ownership is explicitly transferred between tasks and the underlying C++ memory is safely encapsulated.
-
getCookiefunctionRead a named cookie from the current HTTP or WebSocket request.
-
getThreadIdfunctionGet current thread ID for logging Should match C++ thread ID for consistency in logs
-
getThreadNamefunctionGet current thread name for logging
-
handleStandardReplyfunctionHandle standard RPC reply (for client proxy) Returns 0 for success, -1 for BlockResponse (has data), or error code for errors
-
kInitialWindowSizevariableProducer's starting credit pool when nothing was advertised (legacy peers).
-
makeSimpleAnswerfunctionCreate a simple answer message (for servant dispatch) Equivalent to nprpc::impl::make_simple_answer in C++
-
marshal_fundamental_arrayfunctionEncodes a fixed-size array of plain values (
T[N]). Used by generated code. -
marshal_fundamental_vectorfunctionMarshal a contiguous array of trivial/fundamental elements into a flat vector.
-
marshal_optional_fundamentalfunctionEncodes an optional plain value (
name?: T) that is present. Used by generated code. -
marshal_optional_structfunctionEncodes an optional message that is present. Used by generated code.
-
marshal_stream_fundamentalfunctionEncodes a plain value as a stream chunk payload. Used by generated code.
-
marshal_stream_fundamental_vectorfunctionEncodes an array of plain values as a stream chunk payload. Used by generated code.
-
marshal_stream_stringfunctionEncodes a string as a stream chunk payload. Used by generated code.
-
marshal_stream_structfunctionEncodes a message as a stream chunk payload, growing
bufferbyrootSizeplusextraCapacityfor its variable parts. Used by generated code. -
marshal_stringfunctionMarshal a Swift String as a flat vector of UTF-8 bytes (offset + count + payload). Uses the string's contiguous UTF-8 storage when available — no intermediate
Array. -
marshal_string_arrayfunctionEncodes a fixed-size array of strings. Used by generated code.
-
marshal_string_vectorfunctionEncodes an array of strings as a
vector<string>field. Used by generated code. -
marshal_struct_arrayfunctionEncodes a fixed-size array of messages. Used by generated code.
-
marshal_struct_vectorfunctionEncodes an array of messages as a
vector<Message>field. Used by generated code. -
narrowfunctionNarrow Object reference to a specific class (for clientside proxies)
-
nplogfunctionPrints
messagein the runtime's log format: timestamp, thread,componentand a one-letterlevel("I", "W", "E", ...). -
NPRPCBidiStreamstructBoth directions of a
bidi_streammethod: write what you send, iterate what the other side sends. -
NPRPCEndpointstructEndpoint information for connecting to remote objects
-
NPRPCErrorprotocolBase protocol for all NPRPC errors
-
NPRPCObjectclassSwift representation of a remote C++ nprpc::Object All data is accessed through the C++ object via the bridge - no duplication
-
NPRPCObjectDatatypealiasRepresents NPRPC object metadata for marshalling This is a typealias to the IDL-generated detail.ObjectId
-
nprpcProbeStreamInitfunctionRuns
bodyand waits until either the first stream access (viainstallFirstAccess) or an init-time throw / clean return. -
NPRPCServantclassBase class for Swift servants
-
NPRPCStreamReaderclassThe receiving end of a stream: what a proxy's
server_streammethod returns, and what a servant'sclient_streammethod receives. -
NPRPCStreamWriterclassThe sending end of a stream: the writer half of a client or bidi stream, and what a servant uses to push a
server_stream. -
ObjectActivationFlagsstructObject activation flags controlling which transports an object is available on.
-
ObjectIdPolicyenumObject ID policy for POA
-
PageHandlertypealiasRenders a page, or returns
nilto decline the request. -
PageRequeststructOne HTTP request offered to a
PageHandler. -
PageResponsestructA handler's answer for a
PageRequest. -
PoaclassPortable Object Adapter - manages servant lifecycle
-
PoaDispatchExecutorenumWhere servant
dispatchruns for objects activated on a POA. -
PoaExecutorprotocolA serial execution context that is a thread with its own event loop rather than a
DispatchQueue. -
PoaLifetimeenumPOA lifetime policy
-
RpcclassNPRPC runtime singleton
-
RpcBuilderclassRoot builder - entry point for fluent API
-
RpcBuilderHttpclassHTTP/WebSocket-specific builder with SSL and page-rendering options
-
RpcBuilderProtocolprotocolBase protocol for all RPC builders providing common configuration
-
RpcBuilderQuicclassQUIC-specific builder with TLS configuration
-
RpcBuilderTcpclassTCP-specific builder
-
RpcConfigurationstructConfiguration for NPRPC runtime
-
RuntimeErrorstructGeneric NPRPC runtime error
-
setCookiefunctionQueue a
Set-Cookieheader to be included in the HTTP response. -
StreamInitProbeResultenumResult of probing whether a stream servant method failed during init.
-
StreamYielderclassServer-side stream yielder for sending data chunks to client
-
TransportTypeenumTransport protocol for NPRPC communication
-
UnexpectedReplyErrorstructUnexpected reply error
-
unmarshal_fundamental_arrayfunctionDecodes a fixed-size array of plain values. Used by generated code.
-
unmarshal_fundamental_vectorfunctionUnmarshal a flat vector of fundamental elements with a single bulk copy (same path as
unmarshal_fundamental_array). -
unmarshal_object_proxyfunctionUnmarshal a remote object reference from flat buffer This is the Swift equivalent of C++ create_object_from_flat Pass the raw buffer pointer directly to C++ to avoid data duplication
-
unmarshal_optional_fundamentalfunctionDecodes an optional plain value; nil when absent. Used by generated code.
-
unmarshal_optional_structfunctionDecodes an optional message; nil when absent. Used by generated code.
-
unmarshal_stream_fundamental_vectorfunctionDecodes an array of plain values from a stream chunk payload. Used by generated code.
-
unmarshal_stringfunctionUnmarshal a UTF-8 flat string. Builds
Stringdirectly from the wire bytes (no intermediateDataallocation). -
unmarshal_string_arrayfunctionDecodes a fixed-size array of strings. Used by generated code.
-
unmarshal_string_vectorfunctionDecodes a
vector<string>field. Used by generated code. -
unmarshal_struct_arrayfunctionDecodes a fixed-size array of messages. Used by generated code.
-
unmarshal_struct_vectorfunctionDecodes a
vector<Message>field. Used by generated code.
NPRPCWeb
-
TemplateErrorenumWhy a
TemplateLibrarycould not load its directory. -
TemplateLibraryclassLoads a directory of
.mustachefiles and renders from it.