// generated by diplomat-tool
// dart format off

part of 'lib.g.dart';

final class _IsoWeekOfYearFfi extends ffi.Struct {
  @ffi.Uint8()
  external int weekNumber;
  @ffi.Int32()
  external int isoYear;
}

/// See the [Rust documentation for `IsoWeekOfYear`](https://docs.rs/icu/2.2.0/icu/calendar/types/struct.IsoWeekOfYear.html) for more information.
final class IsoWeekOfYear {
  // ignore: public_member_api_docs
  int weekNumber;
  // ignore: public_member_api_docs
  int isoYear;

  // ignore: public_member_api_docs
  IsoWeekOfYear({required this.weekNumber, required this.isoYear});

  // 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
  IsoWeekOfYear._fromFfi(_IsoWeekOfYearFfi ffi) :
    weekNumber = ffi.weekNumber,
    isoYear = ffi.isoYear;

  // ignore: unused_element
  _IsoWeekOfYearFfi _toFfi(ffi.Allocator temp) {
    final struct = ffi.Struct.create<_IsoWeekOfYearFfi>();
    struct.weekNumber = weekNumber;
    struct.isoYear = isoYear;
    return struct;
  }


  @override
  bool operator ==(Object other) =>
      other is IsoWeekOfYear &&
      other.weekNumber == weekNumber &&
      other.isoYear == isoYear;

  @override
  int get hashCode => Object.hashAll([
        weekNumber,
        isoYear,
      ]);
}

// dart format on
