Expand description
§Getting started on turnloop
Enable the turnloop feature for the asynchronous module. The embedding
host owns LocalExecutor and calls turn; adapters await its streams and
deadline futures. See the crate README and turnloop-io for ownership, streaming
and cancellation examples. Default features retain the sans-I/O API.
Pull-based, bounded, sans-I/O PostgreSQL client.
Feed bytes with receive, pull next_event, write output, then acknowledge
only transmitted bytes with consume_output. Events borrow reusable storage.
The host owns sockets, TLS, entropy, time and result materialization.
Modules§
- pool
- Sans-I/O pool: the host executes Connect/Close requests, then reports their completion. Checkout events are FIFO; idle reuse is LIFO, as in pg/mysql2.
- types
- Common PostgreSQL codecs.
Int8andNumericremain exact: pg’s default JS parsers use strings. JSON parsing and local-time JS Date construction belong to the host; neither reads a clock here.
Structs§
- Channel
Binding - The channel binding configuration for a SCRAM authentication exchange.
- Config
- Connection
- Connection
Failure - Owned terminal server diagnostic. Clones share one copy of all wire fields. Only connection failure allocates; ordinary statement errors remain borrowed.
- Extended
Query - Parameters of one extended-protocol operation. An empty name is uncached.
- Field
- Fields
- Instant
- A measurement of a monotonically nondecreasing clock.
Opaque and useful only with
Duration. - Owned
Fields - Owned RowDescription.
fields()iterates it exactly like the borrowed form. - Owned
Row - Owned, already validated DataRow.
row()lends the same borrowed iterator, so one host decoder serves both forms;getindexes a column directly. - Owned
Server Error - Owned ErrorResponse/NoticeResponse with every field, including future ones.
- Parameter
- A parameter is already encoded by the host or
types; 0=text, 1=binary. - Row
- Borrowed, already validated PostgreSQL row. Iteration never allocates.
- Scram
Sha256 - A type which handles the client side of the SCRAM-SHA-256/SCRAM-SHA-256-PLUS authentication process.
- Server
Error - ErrorResponse and NoticeResponse retain every field, including future fields.
- Transport
Failure - Host-supplied transport diagnostic. Clones share one copy of the message, so aborting a pipeline of tokens allocates nothing.
Enums§
- Error
- Event
- Outcome
- Owned
Event Eventwith every borrowed payload copied out, for hosts that retain rows, errors or notifications past the next mutable call.as_eventlends it back in borrowed form, so one host handler can consume either.- SslMode
- Transaction
Status