pub struct UFormattedNumber { /* private fields */ }
Expand description
Stores a formatted number result.
These objects are produced UNumberFormatter::format_int, UNumberFormatter::format_double, UNumberFormatter::format_decimal.
Implementations
sourceimpl UFormattedNumber
impl UFormattedNumber
sourcepub fn try_field_iter<'a>(
&'a self
) -> Result<UFieldPositionIterator<'a, Self>, Error>
pub fn try_field_iter<'a>(
&'a self
) -> Result<UFieldPositionIterator<'a, Self>, Error>
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
sourceimpl Debug for UFormattedNumber
impl Debug for UFormattedNumber
sourceimpl Drop for UFormattedNumber
impl Drop for UFormattedNumber
sourceimpl TryInto<String> for UFormattedNumber
impl TryInto<String> for UFormattedNumber
sourcefn try_into(self) -> Result<String, Error>
fn try_into(self) -> Result<String, Error>
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.
sourceimpl TryInto<UChar> for UFormattedNumber
impl TryInto<UChar> for UFormattedNumber
sourcefn try_into(self) -> Result<UChar, Error>
fn try_into(self) -> Result<UChar, Error>
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.
Auto Trait Implementations
impl RefUnwindSafe for UFormattedNumber
impl !Send for UFormattedNumber
impl !Sync for UFormattedNumber
impl Unpin for UFormattedNumber
impl UnwindSafe for UFormattedNumber
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