Connection

:= {
    config : Config,
    transport : ByteIo(read_err, write_err),
}

Validated Config bound to one platform transport for repeated exchanges. This is not a socket owner or pool lease: aliases still share the transport. Give each exchange exclusive access and discard after ExchangeFailed.

Client.attach is the usual way to build one; open is the direct route when no session policy (auth/db) is involved.

open : Config, ByteIo(read_err, write_err) -> Connection(read_err, write_err)
request! : Connection(read_err, write_err), Request(value, decode_err) => Try(value, Error(read_err, write_err, decode_err))
batch! : Connection(read_err, write_err), Batch(value, decode_err) => Try(value, [RequestRejected(ValidationError), ExchangeFailed(ExchangeError(read_err, write_err)), BatchDecodeFailure(decode_err), ReplyCountMismatch({ expected : U64, actual : U64 })])