toInt method
Deserializes the payload as an int64 value.
Throws ZenohException with code -7 (canon's Z_EDESERIALIZE)
if the payload is shorter than the int64 width, and with code 12
(binding-owned) if it carries data beyond the int64 value (e.g. a
multi-value payload) -- see the class doc for why those two codes
must differ.
Throws StateError if this ZBytes has been disposed or consumed.
Implementation
int toInt() => _readOne('int64', (d) => d.deserializeInt64());