Macro rust_icu_common::format_ustring_for_type [−][src]
macro_rules! format_ustring_for_type { ($method_name:ident, $function_name:ident, $type_decl:ty) => { ... }; }
Expand description
There is a slew of near-identical method calls which differ in the type of the input argument and the name of the function to invoke.
The invocation:
ⓘ
impl ... { // ... format_ustring_for_type!(format_f64, unum_formatDouble, f64); }
allows us to bind the function:
int32_t unum_formatDouble(
const UNumberFormat* fmt,
double number,
UChar* result,
int32_t result_length,
UFieldPosition* pos,
UErrorCode *status)
as:
ⓘ
impl ... { format_f64(&self /* format */, value: f64) -> Result<ustring::UChar, common::Error>; }