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

part of 'lib.g.dart';

/// See the [Rust documentation for `WordBreak`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html) for more information.
enum WordBreak {
  /// See the [Rust documentation for `Other`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.Other) for more information.
  other,
  /// See the [Rust documentation for `ALetter`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.ALetter) for more information.
  aLetter,
  /// See the [Rust documentation for `Format`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.Format) for more information.
  format,
  /// See the [Rust documentation for `Katakana`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.Katakana) for more information.
  katakana,
  /// See the [Rust documentation for `MidLetter`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.MidLetter) for more information.
  midLetter,
  /// See the [Rust documentation for `MidNum`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.MidNum) for more information.
  midNum,
  /// See the [Rust documentation for `Numeric`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.Numeric) for more information.
  numeric,
  /// See the [Rust documentation for `ExtendNumLet`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.ExtendNumLet) for more information.
  extendNumLet,
  /// See the [Rust documentation for `CR`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.CR) for more information.
  cr,
  /// See the [Rust documentation for `Extend`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.Extend) for more information.
  extend,
  /// See the [Rust documentation for `LF`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.LF) for more information.
  lf,
  /// See the [Rust documentation for `MidNumLet`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.MidNumLet) for more information.
  midNumLet,
  /// See the [Rust documentation for `Newline`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.Newline) for more information.
  newline,
  /// See the [Rust documentation for `RegionalIndicator`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.RegionalIndicator) for more information.
  regionalIndicator,
  /// See the [Rust documentation for `HebrewLetter`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.HebrewLetter) for more information.
  hebrewLetter,
  /// See the [Rust documentation for `SingleQuote`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.SingleQuote) for more information.
  singleQuote,
  /// See the [Rust documentation for `DoubleQuote`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.DoubleQuote) for more information.
  doubleQuote,
  /// See the [Rust documentation for `EBase`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.EBase) for more information.
  eBase,
  /// See the [Rust documentation for `EBaseGAZ`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.EBaseGAZ) for more information.
  eBaseGaz,
  /// See the [Rust documentation for `EModifier`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.EModifier) for more information.
  eModifier,
  /// See the [Rust documentation for `GlueAfterZwj`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.GlueAfterZwj) for more information.
  glueAfterZwj,
  /// See the [Rust documentation for `ZWJ`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.ZWJ) for more information.
  zwj,
  /// See the [Rust documentation for `WSegSpace`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#associatedconstant.WSegSpace) for more information.
  wSegSpace;

  /// See the [Rust documentation for `for_char`](https://docs.rs/icu/2.2.0/icu/properties/props/trait.EnumeratedProperty.html#tymethod.for_char) for more information.
  static WordBreak forChar(Rune ch) {
    final result = _icu4x_WordBreak_for_char_mv1(ch);
    return WordBreak.values[result];
  }

  /// Get the "long" name of this property value (returns empty if property value is unknown)
  ///
  /// See the [Rust documentation for `get`](https://docs.rs/icu/2.2.0/icu/properties/struct.PropertyNamesLongBorrowed.html#method.get) for more information.
  String? longName() {
    final result = _icu4x_WordBreak_long_name_mv1(index);
    if (!result.isOk) {
      return null;
    }
    return result.union.ok._toDart([], isStatic: true);
  }

  /// Get the "short" name of this property value (returns empty if property value is unknown)
  ///
  /// See the [Rust documentation for `get`](https://docs.rs/icu/2.2.0/icu/properties/struct.PropertyNamesShortBorrowed.html#method.get) for more information.
  String? shortName() {
    final result = _icu4x_WordBreak_short_name_mv1(index);
    if (!result.isOk) {
      return null;
    }
    return result.union.ok._toDart([], isStatic: true);
  }

  /// Convert to an integer value usable with ICU4C and `CodePointMapData`
  ///
  /// See the [Rust documentation for `to_icu4c_value`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#method.to_icu4c_value) for more information.
  int toIntegerValue() {
    final result = _icu4x_WordBreak_to_integer_value_mv1(index);
    return result;
  }

  /// Convert from an integer value from ICU4C or `CodePointMapData`
  ///
  /// See the [Rust documentation for `from_icu4c_value`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.WordBreak.html#method.from_icu4c_value) for more information.
  static WordBreak? fromIntegerValue(int other) {
    final result = _icu4x_WordBreak_from_integer_value_mv1(other);
    if (!result.isOk) {
      return null;
    }
    return WordBreak.values[result.union.ok];
  }

  static WordBreak? tryFromStr(String s) {
    final temp = _FinalizedArena();
    final result = _icu4x_WordBreak_try_from_str_mv1(s._utf8AllocIn(temp.arena));
    if (!result.isOk) {
      return null;
    }
    return WordBreak.values[result.union.ok];
  }

}

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Int32 Function(ffi.Uint32)>(isLeaf: true, symbol: 'icu4x_WordBreak_for_char_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_WordBreak_for_char_mv1(Rune ch);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultSliceUtf8Void Function(ffi.Int32)>(isLeaf: true, symbol: 'icu4x_WordBreak_long_name_mv1')
// ignore: non_constant_identifier_names
external _ResultSliceUtf8Void _icu4x_WordBreak_long_name_mv1(int self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultSliceUtf8Void Function(ffi.Int32)>(isLeaf: true, symbol: 'icu4x_WordBreak_short_name_mv1')
// ignore: non_constant_identifier_names
external _ResultSliceUtf8Void _icu4x_WordBreak_short_name_mv1(int self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Uint8 Function(ffi.Int32)>(isLeaf: true, symbol: 'icu4x_WordBreak_to_integer_value_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_WordBreak_to_integer_value_mv1(int self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultInt32Void Function(ffi.Uint8)>(isLeaf: true, symbol: 'icu4x_WordBreak_from_integer_value_mv1')
// ignore: non_constant_identifier_names
external _ResultInt32Void _icu4x_WordBreak_from_integer_value_mv1(int other);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultInt32Void Function(_SliceUtf8)>(isLeaf: true, symbol: 'icu4x_WordBreak_try_from_str_mv1')
// ignore: non_constant_identifier_names
external _ResultInt32Void _icu4x_WordBreak_try_from_str_mv1(_SliceUtf8 s);

// dart format on
