Struct rust_icu_uformattable::UFormattable
source · [−]pub struct UFormattable<'a> { /* private fields */ }
Implementations
sourceimpl<'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 $impl_function_name
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 $impl_function_name
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 $impl_function_name
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 $impl_function_name
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 $impl_function_name
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 $impl_function_name
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
Trait Implementations
sourceimpl<'a> Debug for UFormattable<'a>
impl<'a> Debug for UFormattable<'a>
sourceimpl<'a> Drop for UFormattable<'a>
impl<'a> Drop for UFormattable<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for UFormattable<'a>
impl<'a> !Send for UFormattable<'a>
impl<'a> !Sync for UFormattable<'a>
impl<'a> Unpin for UFormattable<'a>
impl<'a> UnwindSafe for UFormattable<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more