Struct icu_locid::extensions::Extensions[][src]

pub struct Extensions {
    pub unicode: Unicode,
    pub transform: Transform,
    pub private: Private,
}

A map of extensions associated with a given Locale.

Fields

unicode: Unicodetransform: Transformprivate: Private

Implementations

impl Extensions[src]

pub const fn new() -> Self[src]

Returns a new empty map of extensions. Same as default(), but is const.

Examples

use icu::locid::extensions::Extensions;

assert_eq!(Extensions::new(), Extensions::default());

pub fn is_empty(&self) -> bool[src]

Returns whether there are no extensions present.

Examples

use icu::locid::Locale;

let loc: Locale = "en-US-u-foo".parse()
    .expect("Parsing failed.");

assert_eq!(loc.extensions.is_empty(), false);

Trait Implementations

impl Clone for Extensions[src]

impl Debug for Extensions[src]

impl Default for Extensions[src]

impl Display for Extensions[src]

impl Eq for Extensions[src]

impl Hash for Extensions[src]

impl Ord for Extensions[src]

impl PartialEq<Extensions> for Extensions[src]

impl PartialOrd<Extensions> for Extensions[src]

impl StructuralEq for Extensions[src]

impl StructuralPartialEq for Extensions[src]

impl Writeable for Extensions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.

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.