#[non_exhaustive]pub struct Extensions {
pub unicode: Unicode,
pub transform: Transform,
pub private: Private,
pub other: &'static [Other],
}Expand description
A map of extensions associated with a given Locale.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.unicode: UnicodeA representation of the data for a Unicode extension, when present in the locale identifier.
transform: TransformA representation of the data for a transform extension, when present in the locale identifier.
private: PrivateA representation of the data for a private-use extension, when present in the locale identifier.
other: &'static [Other]A sequence of any other extensions that are present in the locale identifier but are not formally
defined and represented explicitly as Unicode, Transform,
and Private are.
Implementations§
Source§impl Extensions
impl Extensions
Sourcepub const fn from_unicode(unicode: Unicode) -> Self
pub const fn from_unicode(unicode: Unicode) -> Self
Function to create a new map of extensions containing exactly one unicode extension, callable in const
context.
Trait Implementations§
Source§impl Clone for Extensions
impl Clone for Extensions
Source§fn clone(&self) -> Extensions
fn clone(&self) -> Extensions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Extensions
impl Debug for Extensions
Source§impl Default for Extensions
impl Default for Extensions
Source§fn default() -> Extensions
fn default() -> Extensions
Returns the “default value” for a type. Read more
Source§impl Display for Extensions
This trait is implemented for compatibility with fmt!.
To create a string, [Writeable::write_to_string] is usually more efficient.
impl Display for Extensions
This trait is implemented for compatibility with fmt!.
To create a string, [Writeable::write_to_string] is usually more efficient.
Source§impl Hash for Extensions
impl Hash for Extensions
Source§impl PartialEq for Extensions
impl PartialEq for Extensions
Source§impl Writeable for Extensions
impl Writeable for Extensions
Source§fn write_to<W: Write + ?Sized>(&self, sink: &mut W) -> Result
fn write_to<W: Write + ?Sized>(&self, sink: &mut W) -> Result
Writes a string to the given sink. Errors from the sink are bubbled up.
The default implementation delegates to
write_to_parts, and discards any
Part annotations.Source§fn writeable_length_hint(&self) -> LengthHint
fn writeable_length_hint(&self) -> LengthHint
Returns a hint for the number of UTF-8 bytes that will be written to the sink. Read more
Source§fn write_to_parts<S>(&self, sink: &mut S) -> Result<(), Error>where
S: PartsWrite + ?Sized,
fn write_to_parts<S>(&self, sink: &mut S) -> Result<(), Error>where
S: PartsWrite + ?Sized,
Write bytes and
Part annotations to the given sink. Errors from the
sink are bubbled up. The default implementation delegates to write_to,
and doesn’t produce any Part annotations.impl Eq for Extensions
impl StructuralPartialEq for Extensions
Auto Trait Implementations§
impl Freeze for Extensions
impl RefUnwindSafe for Extensions
impl Send for Extensions
impl Sync for Extensions
impl Unpin for Extensions
impl UnwindSafe for Extensions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more