content: // generated by diplomat-tool
  // dart format off
  
  part of 'lib.g.dart';
  
  final class _StructWithSlicesFfi extends ffi.Struct {
    external _SliceUtf8 first;
    external _SliceUint16 second;
  }
  
  final class StructWithSlices {
    String first;
    core.List<int> second;
  
    StructWithSlices({required this.first, required this.second});
  
    // ignore: unused_element
    StructWithSlices._fromFfi(_StructWithSlicesFfi ffi, core.List<Object> aEdges) :
      first = ffi.first._toDart(aEdges),
      second = ffi.second._toDart(aEdges);
  
    // If this struct contains any slices, their lifetime-edge-relevant objects (typically _FinalizedArenas) will only
    // be constructed here, and can be appended to any relevant lifetime arrays here. <lifetime>AppendArray accepts a list
    // of arrays for each lifetime to do so. It accepts multiple lists per lifetime in case the caller needs to tie a lifetime to multiple
    // output arrays. Null is equivalent to an empty list: this lifetime is not being borrowed from.
    // ignore: unused_element
    _StructWithSlicesFfi _toFfi(ffi.Allocator temp, {core.List<core.List<Object>> aAppendArray = const []}) {
      final struct = ffi.Struct.create<_StructWithSlicesFfi>();
      struct.first = first._utf8AllocIn(aAppendArray.isNotEmpty ? _FinalizedArena.withLifetime(aAppendArray).arena : temp);
      struct.second = second._uint16AllocIn(aAppendArray.isNotEmpty ? _FinalizedArena.withLifetime(aAppendArray).arena : temp);
      return struct;
    }
  
    String returnLast() {
      final temp = _FinalizedArena();
      final write = _Write();
      _StructWithSlices_return_last(_toFfi(temp.arena), write._ffi);
      return write.finalize();
    }
  
  
    @override
    bool operator ==(Object other) =>
        other is StructWithSlices &&
        other.first == first &&
        other.second == second;
  
    @override
    int get hashCode => Object.hashAll([
          first,
          second,
        ]);
  
    // Return all fields corresponding to lifetime `'a`
    // without handling lifetime dependencies (this is the job of the caller)
    // This is all fields that may be borrowed from if borrowing `'a`,
    // assuming that there are no `'other: a`. bounds. In case of such bounds,
    // the caller should take care to also call _fieldsForLifetimeOther
    // ignore: unused_element
    core.List<Object> get _fieldsForLifetimeA => [first, second];
  }
  
  @_DiplomatFfiUse('StructWithSlices_return_last')
  @ffi.Native<ffi.Void Function(_StructWithSlicesFfi, ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'StructWithSlices_return_last')
  // ignore: non_constant_identifier_names
  external void _StructWithSlices_return_last(_StructWithSlicesFfi self, ffi.Pointer<ffi.Opaque> write);
  
  // dart format on
  