content: // generated by diplomat-tool
  // dart format off
  
  part of 'lib.g.dart';
  
  final class _OptionStructFfi extends ffi.Struct {
    external ffi.Pointer<ffi.Opaque> a;
    external ffi.Pointer<ffi.Opaque> b;
    @ffi.Uint32()
    external int c;
    external ffi.Pointer<ffi.Opaque> d;
  }
  
  final class OptionStruct {
    final OptionOpaque? a;
    final OptionOpaqueChar? b;
    final int c;
    final OptionOpaque d;
  
    // This struct contains borrowed fields, so this takes in a list of
    // "edges" corresponding to where each lifetime's data may have been borrowed from
    // and passes it down to individual fields containing the borrow.
    // This method does not attempt to handle any dependencies between lifetimes, the caller
    // should handle this when constructing edge arrays.
    // ignore: unused_element
    OptionStruct._fromFfi(_OptionStructFfi ffi) :
      a = ffi.a.address == 0 ? null : OptionOpaque._fromFfi(ffi.a, []),
      b = ffi.b.address == 0 ? null : OptionOpaqueChar._fromFfi(ffi.b, []),
      c = ffi.c,
      d = OptionOpaque._fromFfi(ffi.d, []);
  
    // ignore: unused_element
    _OptionStructFfi _toFfi(ffi.Allocator temp) {
      final struct = ffi.Struct.create<_OptionStructFfi>();
      struct.a = a?._ffi ?? ffi.Pointer.fromAddress(0);
      struct.b = b?._ffi ?? ffi.Pointer.fromAddress(0);
      struct.c = c;
      struct.d = d._ffi;
      return struct;
    }
  
  
    @override
    bool operator ==(Object other) =>
        other is OptionStruct &&
        other.a == a &&
        other.b == b &&
        other.c == c &&
        other.d == d;
  
    @override
    int get hashCode => Object.hashAll([
          a,
          b,
          c,
          d,
        ]);
  }
  
  // dart format on
  