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 -1becomesNone; any other value is a bytes-per-second quota.- opt_
rate_ to_ bytes_ per_ sec_ i64 Nonebecomes-1.- opt_
size_ from_ bytes_ i32 -1becomesNone; any other value is a byte count.- opt_
size_ from_ bytes_ i64 -1becomesNone; any other value is a byte count.- opt_
size_ to_ bytes_ i32 Nonebecomes-1.- opt_
size_ to_ bytes_ i64 Nonebecomes-1.- opt_
time_ from_ millis_ i64 -1becomesNone; any other value is a millisecond extent.- opt_
time_ to_ millis_ i64 Nonebecomes-1.