Skip to main content

Crate turnloop_postgres

Crate turnloop_postgres 

Source
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. Int8 and Numeric remain 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§

ChannelBinding
The channel binding configuration for a SCRAM authentication exchange.
Config
Connection
ConnectionFailure
Owned terminal server diagnostic. Clones share one copy of all wire fields. Only connection failure allocates; ordinary statement errors remain borrowed.
ExtendedQuery
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.
Parameter
A parameter is already encoded by the host or types; 0=text, 1=binary.
Row
Borrowed, already validated PostgreSQL row. Iteration never allocates.
ScramSha256
A type which handles the client side of the SCRAM-SHA-256/SCRAM-SHA-256-PLUS authentication process.
ServerError
ErrorResponse and NoticeResponse retain every field, including future fields.

Enums§

Error
Event
Outcome
SslMode
TransactionStatus

Type Aliases§

Result
Token