[−][src]Enum langtag::GrandfatheredTag
Grandfathered tags.
Prior to RFC 4646, whole language tags were registered according to the rules in RFC 1766 and/or RFC 3066. All of these registered tags remain valid as language tags. Many of these registered tags were made redundant by the advent of either RFC 4646 or RFC 5646. The remainder of the previously registered tags are "grandfathered", and are all veriants of this enum type.
Variants
Implementations
impl GrandfatheredTag
[src]
pub fn new<T: AsRef<[u8]>>(t: T) -> Result<GrandfatheredTag, T>
[src]
Try to parse a grandfathered tag.
pub fn language(&self) -> Option<&Language>
[src]
Get the language the grandfathered tag if it is regular.
pub fn as_bytes(&self) -> &[u8]
[src]
Returns the bytes representation of the tag.
pub fn as_str(&self) -> &str
[src]
Returns the string representation of the tag.
Trait Implementations
impl Clone for GrandfatheredTag
[src]
pub fn clone(&self) -> GrandfatheredTag
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for GrandfatheredTag
[src]
impl Eq for GrandfatheredTag
[src]
impl Hash for GrandfatheredTag
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for GrandfatheredTag
[src]
pub fn cmp(&self, other: &GrandfatheredTag) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<GrandfatheredTag> for GrandfatheredTag
[src]
pub fn eq(&self, other: &GrandfatheredTag) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<GrandfatheredTag> for GrandfatheredTag
[src]
pub fn partial_cmp(&self, other: &GrandfatheredTag) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for GrandfatheredTag
[src]
impl StructuralPartialEq for GrandfatheredTag
[src]
impl<'a> TryFrom<&'a [u8]> for GrandfatheredTag
[src]
Auto Trait Implementations
impl RefUnwindSafe for GrandfatheredTag
[src]
impl Send for GrandfatheredTag
[src]
impl Sync for GrandfatheredTag
[src]
impl Unpin for GrandfatheredTag
[src]
impl UnwindSafe for GrandfatheredTag
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,