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

part of 'lib.g.dart';

final class _PluralCategoriesFfi extends ffi.Struct {
  @ffi.Bool()
  external bool zero;
  @ffi.Bool()
  external bool one;
  @ffi.Bool()
  external bool two;
  @ffi.Bool()
  external bool few;
  @ffi.Bool()
  external bool many;
  @ffi.Bool()
  external bool other;
}

/// See the [Rust documentation for `categories`](https://docs.rs/icu/2.2.0/icu/plurals/struct.PluralRules.html#method.categories) for more information.
final class PluralCategories {
  // ignore: public_member_api_docs
  final bool zero;
  // ignore: public_member_api_docs
  final bool one;
  // ignore: public_member_api_docs
  final bool two;
  // ignore: public_member_api_docs
  final bool few;
  // ignore: public_member_api_docs
  final bool many;
  // ignore: public_member_api_docs
  final bool other;

  // 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
  PluralCategories._fromFfi(_PluralCategoriesFfi ffi) :
    zero = ffi.zero,
    one = ffi.one,
    two = ffi.two,
    few = ffi.few,
    many = ffi.many,
    other = ffi.other;

  // ignore: unused_element
  _PluralCategoriesFfi _toFfi(ffi.Allocator temp) {
    final struct = ffi.Struct.create<_PluralCategoriesFfi>();
    struct.zero = zero;
    struct.one = one;
    struct.two = two;
    struct.few = few;
    struct.many = many;
    struct.other = other;
    return struct;
  }


  @override
  bool operator ==(Object other) =>
      other is PluralCategories &&
      other.zero == zero &&
      other.one == one &&
      other.two == two &&
      other.few == few &&
      other.many == many &&
      other.other == this.other;

  @override
  int get hashCode => Object.hashAll([
        zero,
        one,
        two,
        few,
        many,
        other,
      ]);
}

// dart format on
