Struct rust_icu_utrans::UTransliterator [−][src]
pub struct UTransliterator { /* fields omitted */ }
Expand description
Rust wrapper for the ICU UTransliterator
type.
Implementations
impl UTransliterator
[src]
impl UTransliterator
[src]pub fn get_ids() -> Result<Enumeration, Error>
[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]
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]
pub fn new(
id: &str,
rules: Option<&str>,
dir: UTransDirection
) -> Result<Self, Error>
[src]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]
pub fn new_ustring(
id: &UChar,
rules: Option<&UChar>,
dir: UTransDirection
) -> Result<Self, Error>
[src]Implements utrans_openU
.
pub fn get_id(&self) -> Result<String, Error>
[src]
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]
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]
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]
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]
pub fn set_filter_ustring(
&mut self,
pattern: Option<&UChar>
) -> Result<(), Error>
[src]Implements utrans_setFilter
.
pub fn transliterate(&self, text: &str) -> Result<String, Error>
[src]
pub fn transliterate(&self, text: &str) -> Result<String, Error>
[src]Returns a string containing the transliterated text.
Implements utrans_transUChars
.
Trait Implementations
impl Clone for UTransliterator
[src]
impl Clone for UTransliterator
[src]impl Debug for UTransliterator
[src]
impl Debug for UTransliterator
[src]impl Drop 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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more