Struct RegionCode
pub struct RegionCode { /* private fields */ }Expand description
A normalized region subtag.
Implementations§
§impl RegionCode
impl RegionCode
pub fn new(input: &str) -> Option<RegionCode>
pub fn new(input: &str) -> Option<RegionCode>
Parses and normalizes a region subtag.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the region code and returns the normalized string.
pub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Returns true when this region subtag is numeric.
Trait Implementations§
§impl AsRef<str> for RegionCode
impl AsRef<str> for RegionCode
§impl Clone for RegionCode
impl Clone for RegionCode
§fn clone(&self) -> RegionCode
fn clone(&self) -> RegionCode
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 more§impl Debug for RegionCode
impl Debug for RegionCode
§impl Display for RegionCode
impl Display for RegionCode
§impl Hash for RegionCode
impl Hash for RegionCode
§impl Ord for RegionCode
impl Ord for RegionCode
§impl PartialEq for RegionCode
impl PartialEq for RegionCode
§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