Struct rust_icu_uformattable::UFormattable
source · pub struct UFormattable<'a> { /* private fields */ }
Implementations§
source§impl<'a> UFormattable<'a>
impl<'a> UFormattable<'a>
sourcepub fn try_new<'b>() -> Result<UFormattable<'b>, Error>
pub fn try_new<'b>() -> Result<UFormattable<'b>, Error>
Initialize a crate::UFormattable to type UNUM_LONG
, value 0 may
return error.
Implements ufmt_open
.
pub fn as_ptr(&self) -> *const UFormattable
sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Returns true
if this formattable is numeric.
Implements ufmt_isNumeric
sourcepub fn get_type(&self) -> Result<UFormattableType, Error>
pub fn get_type(&self) -> Result<UFormattableType, Error>
Implements ufmt_getType
.
Use UFormattable::get_type to verify that the type matches.
sourcepub fn get_date(&self) -> Result<UDate, Error>
pub fn get_date(&self) -> Result<UDate, Error>
Implements ufmt_getDate
.
Use UFormattable::get_type to verify that the type matches.
sourcepub fn get_double(&self) -> Result<f64, Error>
pub fn get_double(&self) -> Result<f64, Error>
Implements ufmt_getDouble
.
Use UFormattable::get_type to verify that the type matches.
sourcepub fn get_i32(&self) -> Result<i32, Error>
pub fn get_i32(&self) -> Result<i32, Error>
Implements ufmt_getLong
.
Use UFormattable::get_type to verify that the type matches.
sourcepub fn get_i64(&self) -> Result<i64, Error>
pub fn get_i64(&self) -> Result<i64, Error>
Implements ufmt_getInt64
.
Use UFormattable::get_type to verify that the type matches.
sourcepub fn get_array_length(&self) -> Result<i32, Error>
pub fn get_array_length(&self) -> Result<i32, Error>
Implements ufmt_getArrayLength
.
Use UFormattable::get_type to verify that the type matches.
pub fn get_ustring(&self) -> Result<UChar, Error>
sourcepub fn get_array_item_by_index(
&'a self,
index: i32
) -> Result<UFormattable<'a>, Error>
pub fn get_array_item_by_index( &'a self, index: i32 ) -> Result<UFormattable<'a>, Error>
Use UFormattable::get_type to ensure that this formattable is an array before using this method. Otherwise you will get an error. The lifetime of the resulting formattable is tied to this one.
Implements ufmt_getArrayItemByIndex
sourcepub fn get_dec_num_chars(&self) -> Result<String, Error>
pub fn get_dec_num_chars(&self) -> Result<String, Error>
Implements ufmt_getDecNumChars