content: // generated by diplomat-tool
  // dart format off
  
  part of 'lib.g.dart';
  
  final class MyOpaqueEnum implements ffi.Finalizable {
    final ffi.Pointer<ffi.Opaque> _ffi;
  
    // These are "used" in the sense that they keep dependencies alive
    // ignore: unused_field
    final core.List<Object> _selfEdge;
  
    // This takes in a list of lifetime edges (including for &self borrows)
    // corresponding to data this may borrow from. These should be flat arrays containing
    // references to objects, and this object will hold on to them to keep them alive and
    // maintain borrow validity.
    MyOpaqueEnum._fromFfi(this._ffi, this._selfEdge) {
      if (_selfEdge.isEmpty) {
        _finalizer.attach(this, _ffi.cast());
      }
    }
  
    @_DiplomatFfiUse('MyOpaqueEnum_destroy')
    static final _finalizer = ffi.NativeFinalizer(ffi.Native.addressOf(_MyOpaqueEnum_destroy));
  
    static MyOpaqueEnum new_() {
      final result = _MyOpaqueEnum_new();
      return MyOpaqueEnum._fromFfi(result, []);
    }
  
    String toString() {
      final write = _Write();
      _MyOpaqueEnum_to_string(_ffi, write._ffi);
      return write.finalize();
    }
  
  }
  
  @_DiplomatFfiUse('MyOpaqueEnum_destroy')
  @ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(isLeaf: true, symbol: 'MyOpaqueEnum_destroy')
  // ignore: non_constant_identifier_names
  external void _MyOpaqueEnum_destroy(ffi.Pointer<ffi.Void> self);
  
  @_DiplomatFfiUse('MyOpaqueEnum_new')
  @ffi.Native<ffi.Pointer<ffi.Opaque> Function()>(isLeaf: true, symbol: 'MyOpaqueEnum_new')
  // ignore: non_constant_identifier_names
  external ffi.Pointer<ffi.Opaque> _MyOpaqueEnum_new();
  
  @_DiplomatFfiUse('MyOpaqueEnum_to_string')
  @ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Opaque>, ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'MyOpaqueEnum_to_string')
  // ignore: non_constant_identifier_names
  external void _MyOpaqueEnum_to_string(ffi.Pointer<ffi.Opaque> self, ffi.Pointer<ffi.Opaque> write);
  
  // dart format on
  