Struct rust_icu_uformattable::UFormattable[][src]

pub struct UFormattable<'a> { /* fields omitted */ }

Implementations

impl<'a> UFormattable<'a>[src]

pub fn try_new<'b>() -> Result<UFormattable<'b>, Error>[src]

Initialize a crate::UFormattable to type UNUM_LONG, value 0 may return error.

Implements ufmt_open.

pub fn as_ptr(&self) -> *const UFormattable[src]

pub fn is_numeric(&self) -> bool[src]

Returns true if this formattable is numeric.

Implements ufmt_isNumeric

pub fn get_type(&self) -> Result<UFormattableType, Error>[src]

Implements $impl_function_name Use UFormattable::get_type to verify that the type matches.

pub fn get_date(&self) -> Result<UDate, Error>[src]

Implements $impl_function_name Use UFormattable::get_type to verify that the type matches.

pub fn get_double(&self) -> Result<f64, Error>[src]

Implements $impl_function_name Use UFormattable::get_type to verify that the type matches.

pub fn get_i32(&self) -> Result<i32, Error>[src]

Implements $impl_function_name Use UFormattable::get_type to verify that the type matches.

pub fn get_i64(&self) -> Result<i64, Error>[src]

Implements $impl_function_name Use UFormattable::get_type to verify that the type matches.

pub fn get_array_length(&self) -> Result<i32, Error>[src]

Implements $impl_function_name Use UFormattable::get_type to verify that the type matches.

pub fn get_ustring(&self) -> Result<UChar, Error>[src]

pub fn get_str(&self) -> Result<String, Error>[src]

Implements ufmt_getUChars

pub fn get_array_item_by_index(
    &'a self,
    index: i32
) -> Result<UFormattable<'a>, Error>
[src]

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

pub fn get_dec_num_chars(&self) -> Result<String, Error>[src]

Implements ufmt_getDecNumChars

Trait Implementations

impl<'a> Debug for UFormattable<'a>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'a> Drop for UFormattable<'a>[src]

fn drop(&mut self)[src]

Implements ufmt_close.

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.