[−][src]Struct rust_icu_utrans::UTransliterator
Rust wrapper for the ICU UTransliterator
type.
Implementations
impl UTransliterator
[src]
pub fn get_ids() -> Result<Enumeration, Error>
[src]
Returns an enumeration containing the identifiers of all available transliterators.
Implements utrans_openIDs
.
pub fn register(trans: Self) -> Result<(), Error>
[src]
Consumes trans
and registers it with the underlying ICU system.
A transliterator that has been registered with the system can be
retrieved by calling new
with its identifier.
Implements utrans_register
.
pub fn new(
id: &str,
rules: Option<&str>,
dir: UTransDirection
) -> Result<Self, Error>
[src]
id: &str,
rules: Option<&str>,
dir: UTransDirection
) -> Result<Self, Error>
If rules are given, creates a new transliterator with rules and identifier. Otherwise, returns the ICU system transliterator with the given identifier.
Implements utrans_openU
.
pub fn new_ustring(
id: &UChar,
rules: Option<&UChar>,
dir: UTransDirection
) -> Result<Self, Error>
[src]
id: &UChar,
rules: Option<&UChar>,
dir: UTransDirection
) -> Result<Self, Error>
Implements utrans_openU
.
pub fn get_id(&self) -> Result<String, Error>
[src]
Returns the identifier for this transliterator.
Implements utrans_getUnicodeID
.
pub fn inverse(&self) -> Result<Self, Error>
[src]
Returns the inverse of this transliterator, provided that the inverse
has been registered with the underlying ICU system, i.e., a built-in
ICU transliterator or one registered with register
.
Implements utrans_openInverse
.
pub fn to_rules(&self, escape_unprintable: bool) -> Result<String, Error>
[src]
Returns a rules string for this transliterator in the same format
expected by new
.
Implements utrans_toRules
.
pub fn set_filter(&mut self, pattern: Option<&str>) -> Result<(), Error>
[src]
Apply a filter to this transliterator, causing certain characters to
pass through untouched. The filter is formatted as a
UnicodeSet
string. If the filter is None
, then any previously-applied filter
is cleared.
Implements utrans_setFilter
.
pub fn set_filter_ustring(
&mut self,
pattern: Option<&UChar>
) -> Result<(), Error>
[src]
&mut self,
pattern: Option<&UChar>
) -> Result<(), Error>
Implements utrans_setFilter
.
pub fn transliterate(&self, text: &str) -> Result<String, Error>
[src]
Returns a string containing the transliterated text.
Implements utrans_transUChars
.
pub fn transliterate_ustring(&self, text: &UChar) -> Result<UChar, Error>
[src]
Implements utrans_transUChars
.
pub fn unregister(id: &str) -> Result<(), Error>
[src]
Unregister a transliterator from the underlying ICU system.
Implements utrans_unregisterID
.
Trait Implementations
impl Clone for UTransliterator
[src]
fn clone(&self) -> Self
[src]
Implements utrans_clone
.
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for UTransliterator
[src]
impl Drop for UTransliterator
[src]
Auto Trait Implementations
impl RefUnwindSafe for UTransliterator
impl !Send for UTransliterator
impl !Sync for UTransliterator
impl Unpin for UTransliterator
impl UnwindSafe for UTransliterator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,