Struct Transform
struct Transform { ... }
A list of Unicode BCP47 T Extensions as defined in Unicode Locale Identifier specification.
Transform extension carries information about source language or script of
transformed content, including content that has been transliterated, transcribed,
or translated, or in some other way influenced by the source (See RFC 6497 for details).
Examples
use ;
use ;
let mut loc: Locale =
"de-t-en-us-h0-hybrid".parse.expect;
let en_us: LanguageIdentifier = "en-US".parse.expect;
assert_eq!;
let key: Key = "h0".parse.expect;
let value: Value = "hybrid".parse.expect;
assert_eq!;
Fields
lang: Option<LanguageIdentifier>The
LanguageIdentifierspecified with this locale extension, orNoneif not present.fields: FieldsThe key-value pairs present in this locale extension, with each extension key subtag associated to its provided value subtag.
Implementations
impl Transform
impl Transform
const fn new() -> SelfReturns a new empty map of Transform extensions. Same as
default(), but isconst.Examples
use Transform; assert_eq!;fn is_empty(self: &Self) -> boolReturns
trueif there are no tfields and no tlang in theTransformExtensionList.Examples
use Locale; let mut loc: Locale = "en-US-t-es-ar".parse.expect; assert!;fn clear(self: &mut Self)Clears the transform extension, effectively removing it from the locale.
Examples
use Locale; let mut loc: Locale = "en-US-t-es-ar".parse.unwrap; loc.extensions.transform.clear; assert_eq!;fn total_cmp(self: &Self, other: &Self) -> OrderingReturns an ordering suitable for use in
BTreeSet.The ordering may or may not be equivalent to string ordering, and it may or may not be stable across ICU4X releases.
impl Clone for Transform
fn clone(self: &Self) -> Transform
impl Debug for Transform
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Default for Transform
fn default() -> Transform
impl Display for Transform
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for Transform
impl Freeze for Transform
impl Hash for Transform
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl PartialEq for Transform
fn eq(self: &Self, other: &Transform) -> bool
impl RefUnwindSafe for Transform
impl Send for Transform
impl StructuralPartialEq for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnsafeUnpin for Transform
impl UnwindSafe for Transform
impl Writeable for Transform
fn write_to<W: core::fmt::Write + ?Sized>(self: &Self, sink: &mut W) -> Resultfn writeable_length_hint(self: &Self) -> LengthHint
impl<T> Any for Transform
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Transform
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Transform
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Transform
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> ErasedDestructor for Transform
impl<T> From for Transform
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Transform
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for Transform
fn to_string(self: &Self) -> String
impl<T, U> Into for Transform
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Transform
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Transform
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>