serializeInt8 method

void serializeInt8(
  1. int value
)

Serializes an int8 value.

Throws an ArgumentError naming the domain if value falls outside -128..127, before any native call is made. See the class doc for why the integer widths reject.

Implementation

void serializeInt8(int value) {
  _checkState();
  _requireInRange(value, -128, 127, 'int8');
  final rc = bindings.zd_serializer_serialize_int8(_loanMut().cast(), value);
  if (rc != 0) throw ZenohException('Failed to serialize int8', rc);
}