is_eq : _
Config
:= {
limits : Limits ?? Decoder.default_limits,
max_commands : Positive ?? 4096,
max_request_bytes : Positive ?? 16_777_216,
max_response_bytes : Positive ?? 16_777_216,
read_size : Positive ?? 16_384,
}
Validated resource policy. Construct with defaults and override only what you need; every field is valid by construction, so there is no separate build step:
config = Config.{ read_size: 32_768 }
Scalar limits are compile-time-validated positives, so Config.{ read_size: 0 }
fails to compile; validate a runtime limit through Positive.from_u64 first.
Decoder limits default to sound values, and the decoder tolerates any others.
default : Config
All defaults: a bounded starting policy for ordinary workloads. All byte limits are bytes; decoder limits apply per reply and response bytes apply per exchange.
redis_compatible : Config
Larger finite decoder policy for Redis-sized values. This does not promise compatibility with every server configuration or platform read limit.
decoder_limits : Config -> Limits
command_limit : Config -> U64
request_byte_limit : Config -> U64
response_byte_limit : Config -> U64