Struct rust_icu_unumberformatter::UFormattedNumber[][src]

pub struct UFormattedNumber { /* fields omitted */ }
Expand description

Stores a formatted number result.

These objects are produced UNumberFormatter::format_int, UNumberFormatter::format_double, UNumberFormatter::format_decimal.

Implementations

impl UFormattedNumber[src]

pub fn try_field_iter<'a>(
    &'a self
) -> Result<UFieldPositionIterator<'a, Self>, Error>
[src]

Obtains the field iterator for the formatted result.

Implements unumf_resultGetAllFieldPositions. Since 0.3.1.

Implements unumf_resultNextFieldPosition. Since 0.3.1. All access is via iterators.

Trait Implementations

impl Debug for UFormattedNumber[src]

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

Formats the value using the given formatter. Read more

impl Drop for UFormattedNumber[src]

fn drop(&mut self)[src]

Implements $impl_function_name.

impl TryInto<String> for UFormattedNumber[src]

fn try_into(self) -> Result<String, Error>[src]

Converts this formatted number into a Rust string.

If you intend to use field position iterators on the result, you have to use TryInto<ustring::UChar> instead, because field position iterators use the fixed encoding of ustring::UChar for positioning.

Implements unumf_resultToString. Since 0.3.1.

type Error = Error

The type returned in the event of a conversion error.

impl TryInto<UChar> for UFormattedNumber[src]

fn try_into(self) -> Result<UChar, Error>[src]

Converts this formatted number into a Unicode string.

You want to use this method instead of TryInto<String> when you need to do additional processing on the result, such as extracting fields based on their indexes.

Implements unumf_resultToString. Since 0.3.1.

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

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.