content: // generated by diplomat-tool
  // dart format off
  
  part of 'lib.g.dart';
  
  final class _CyclicStructBFfi extends ffi.Struct {
    @ffi.Uint8()
    external int field;
  }
  
  final class CyclicStructB {
    int field;
  
    CyclicStructB({required this.field});
  
    // 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
    CyclicStructB._fromFfi(_CyclicStructBFfi ffi) :
      field = ffi.field;
  
    // ignore: unused_element
    _CyclicStructBFfi _toFfi(ffi.Allocator temp) {
      final struct = ffi.Struct.create<_CyclicStructBFfi>();
      struct.field = field;
      return struct;
    }
  
    static CyclicStructA getA() {
      final result = _CyclicStructB_get_a();
      return CyclicStructA._fromFfi(result);
    }
  
    static CyclicStructA? getAOption() {
      final result = _CyclicStructB_get_a_option();
      if (!result.isOk) {
        return null;
      }
      return CyclicStructA._fromFfi(result.union.ok);
    }
  
  
    @override
    bool operator ==(Object other) =>
        other is CyclicStructB &&
        other.field == field;
  
    @override
    int get hashCode => Object.hashAll([
          field,
        ]);
  }
  
  @_DiplomatFfiUse('CyclicStructB_get_a')
  @ffi.Native<_CyclicStructAFfi Function()>(isLeaf: true, symbol: 'CyclicStructB_get_a')
  // ignore: non_constant_identifier_names
  external _CyclicStructAFfi _CyclicStructB_get_a();
  
  @_DiplomatFfiUse('CyclicStructB_get_a_option')
  @ffi.Native<_ResultCyclicStructAFfiVoid Function()>(isLeaf: true, symbol: 'CyclicStructB_get_a_option')
  // ignore: non_constant_identifier_names
  external _ResultCyclicStructAFfiVoid _CyclicStructB_get_a_option();
  
  // dart format on
  