| 1 |
import { FFIError } from "./diplomat-runtime" |
| 2 |
import { ICU4XDataProvider } from "./ICU4XDataProvider"; |
| 3 |
import { ICU4XError } from "./ICU4XError"; |
| 4 |
import { ICU4XLocaleFallbackConfig } from "./ICU4XLocaleFallbackConfig"; |
| 5 |
import { ICU4XLocaleFallbackerWithConfig } from "./ICU4XLocaleFallbackerWithConfig"; |
| 6 |
|
| 7 |
/** |
| 8 |
|
| 9 |
* An object that runs the ICU4X locale fallback algorithm. |
| 10 |
|
| 11 |
* See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html Rust documentation for `LocaleFallbacker`} for more information. |
| 12 |
*/ |
| 13 |
export class ICU4XLocaleFallbacker { |
| 14 |
|
| 15 |
/** |
| 16 |
|
| 17 |
* Creates a new `ICU4XLocaleFallbacker` from a data provider. |
| 18 |
|
| 19 |
* See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new Rust documentation for `new`} for more information. |
| 20 |
* @throws {@link FFIError}<{@link ICU4XError}> |
| 21 |
*/ |
| 22 |
static create(provider: ICU4XDataProvider): ICU4XLocaleFallbacker | never; |
| 23 |
|
| 24 |
/** |
| 25 |
|
| 26 |
* Creates a new `ICU4XLocaleFallbacker` without data for limited functionality. |
| 27 |
|
| 28 |
* See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new_without_data Rust documentation for `new_without_data`} for more information. |
| 29 |
*/ |
| 30 |
static create_without_data(): ICU4XLocaleFallbacker; |
| 31 |
|
| 32 |
/** |
| 33 |
|
| 34 |
* Associates this `ICU4XLocaleFallbacker` with configuration options. |
| 35 |
|
| 36 |
* See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.for_config Rust documentation for `for_config`} for more information. |
| 37 |
* @throws {@link FFIError}<{@link ICU4XError}> |
| 38 |
*/ |
| 39 |
for_config(config: ICU4XLocaleFallbackConfig): ICU4XLocaleFallbackerWithConfig | never; |
| 40 |
} |