tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

LineBreakWordOption.d.hpp (1433B)


      1 #ifndef icu4x_LineBreakWordOption_D_HPP
      2 #define icu4x_LineBreakWordOption_D_HPP
      3 
      4 #include <stdio.h>
      5 #include <stdint.h>
      6 #include <stddef.h>
      7 #include <stdbool.h>
      8 #include <memory>
      9 #include <functional>
     10 #include <optional>
     11 #include <cstdlib>
     12 #include "../diplomat_runtime.hpp"
     13 
     14 
     15 namespace icu4x {
     16 namespace capi {
     17    enum LineBreakWordOption {
     18      LineBreakWordOption_Normal = 0,
     19      LineBreakWordOption_BreakAll = 1,
     20      LineBreakWordOption_KeepAll = 2,
     21    };
     22 
     23    typedef struct LineBreakWordOption_option {union { LineBreakWordOption ok; }; bool is_ok; } LineBreakWordOption_option;
     24 } // namespace capi
     25 } // namespace
     26 
     27 namespace icu4x {
     28 /**
     29 * See the [Rust documentation for `LineBreakWordOption`](https://docs.rs/icu/latest/icu/segmenter/options/enum.LineBreakWordOption.html) for more information.
     30 */
     31 class LineBreakWordOption {
     32 public:
     33  enum Value {
     34    Normal = 0,
     35    BreakAll = 1,
     36    KeepAll = 2,
     37  };
     38 
     39  LineBreakWordOption() = default;
     40  // Implicit conversions between enum and ::Value
     41  constexpr LineBreakWordOption(Value v) : value(v) {}
     42  constexpr operator Value() const { return value; }
     43  // Prevent usage as boolean value
     44  explicit operator bool() const = delete;
     45 
     46  inline icu4x::capi::LineBreakWordOption AsFFI() const;
     47  inline static icu4x::LineBreakWordOption FromFFI(icu4x::capi::LineBreakWordOption c_enum);
     48 private:
     49    Value value;
     50 };
     51 
     52 } // namespace
     53 #endif // icu4x_LineBreakWordOption_D_HPP