pub struct RegionCode { /* private fields */ }Expand description
A normalized region subtag.
Implementations§
Source§impl RegionCode
impl RegionCode
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the region code and returns the normalized string.
Sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Returns true when this region subtag is numeric.
Trait Implementations§
Source§impl AsRef<str> for RegionCode
impl AsRef<str> for RegionCode
Source§impl Clone for RegionCode
impl Clone for RegionCode
Source§fn clone(&self) -> RegionCode
fn clone(&self) -> RegionCode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RegionCode
impl Debug for RegionCode
Source§impl Display for RegionCode
impl Display for RegionCode
Source§impl Hash for RegionCode
impl Hash for RegionCode
Source§impl Ord for RegionCode
impl Ord for RegionCode
Source§fn cmp(&self, other: &RegionCode) -> Ordering
fn cmp(&self, other: &RegionCode) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RegionCode
impl PartialEq for RegionCode
Source§fn eq(&self, other: &RegionCode) -> bool
fn eq(&self, other: &RegionCode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for RegionCode
impl PartialOrd for RegionCode
impl Eq for RegionCode
impl StructuralPartialEq for RegionCode
Auto Trait Implementations§
impl Freeze for RegionCode
impl RefUnwindSafe for RegionCode
impl Send for RegionCode
impl Sync for RegionCode
impl Unpin for RegionCode
impl UnsafeUnpin for RegionCode
impl UnwindSafe for RegionCode
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