ZSerializer constructor

ZSerializer()

Creates an empty serializer.

Implementation

ZSerializer() : _ptr = _create() {
  // `_create` either returns a live slot or does not return, so reaching
  // here means the object exists and the net is safe to arm.
  serializerFinalizer.attach(
    this,
    _ptr.cast(),
    detach: this,
    externalSize: bindings.zd_serializer_sizeof(),
  );
}