Skip to main content

Module wire

Module wire 

Source
Expand description

Kafka’s -1 sentinel, which means “unlimited”, “none”, or “no bound” depending on the field, mapped to and from Option.

A None means the field is unset, and the caller decides what unset implies. Do not use these functions for fields where -1 means something else. A timeout_ms of -1 means “block indefinitely”, which is a value and not an absence, and the calling code’s own enum models it better.

Functions§

opt_rate_from_bytes_per_sec_i64
-1 becomes None; any other value is a bytes-per-second quota.
opt_rate_to_bytes_per_sec_i64
None becomes -1.
opt_size_from_bytes_i32
-1 becomes None; any other value is a byte count.
opt_size_from_bytes_i64
-1 becomes None; any other value is a byte count.
opt_size_to_bytes_i32
None becomes -1.
opt_size_to_bytes_i64
None becomes -1.
opt_time_from_millis_i64
-1 becomes None; any other value is a millisecond extent.
opt_time_to_millis_i64
None becomes -1.