| 1 | import { u8, u32 } from "./diplomat-runtime" |
| 2 | import { FFIError } from "./diplomat-runtime" |
| 3 | import { ICU4XError } from "./ICU4XError"; |
| 4 | |
| 5 | /** |
| 6 | |
| 7 | * An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond |
| 8 | |
| 9 | * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Time.html Rust documentation for `Time`} for more information. |
| 10 | */ |
| 11 | export class ICU4XTime { |
| 12 | |
| 13 | /** |
| 14 | |
| 15 | * Creates a new {@link ICU4XTime `ICU4XTime`} given field values |
| 16 | |
| 17 | * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Time.html#method.try_new Rust documentation for `try_new`} for more information. |
| 18 | * @throws {@link FFIError}<{@link ICU4XError}> |
| 19 | */ |
| 20 | static create(hour: u8, minute: u8, second: u8, nanosecond: u32): ICU4XTime | never; |
| 21 | |
| 22 | /** |
| 23 | |
| 24 | * Creates a new {@link ICU4XTime `ICU4XTime`} representing midnight (00:00.000). |
| 25 | |
| 26 | * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Time.html#method.midnight Rust documentation for `midnight`} for more information. |
| 27 | * @throws {@link FFIError}<{@link ICU4XError}> |
| 28 | */ |
| 29 | static create_midnight(): ICU4XTime | never; |
| 30 | |
| 31 | /** |
| 32 | |
| 33 | * Returns the hour in this time |
| 34 | |
| 35 | * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Time.html#structfield.hour Rust documentation for `hour`} for more information. |
| 36 | */ |
| 37 | hour(): u8; |
| 38 | |
| 39 | /** |
| 40 | |
| 41 | * Returns the minute in this time |
| 42 | |
| 43 | * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Time.html#structfield.minute Rust documentation for `minute`} for more information. |
| 44 | */ |
| 45 | minute(): u8; |
| 46 | |
| 47 | /** |
| 48 | |
| 49 | * Returns the second in this time |
| 50 | |
| 51 | * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Time.html#structfield.second Rust documentation for `second`} for more information. |
| 52 | */ |
| 53 | second(): u8; |
| 54 | |
| 55 | /** |
| 56 | |
| 57 | * Returns the nanosecond in this time |
| 58 | |
| 59 | * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Time.html#structfield.nanosecond Rust documentation for `nanosecond`} for more information. |
| 60 | */ |
| 61 | nanosecond(): u32; |
| 62 | } |