[][src]Enum langtag::GrandfatheredTag

pub enum GrandfatheredTag {
    EnGbOed,
    IAmi,
    IBnn,
    IDefault,
    IEnochian,
    IHak,
    IKlingon,
    ILux,
    IMingo,
    INavajo,
    IPwn,
    ITao,
    ITay,
    ITsu,
    SgnBeFr,
    SgnBeNl,
    SgnChDe,
    ArtLojban,
    CelGaulish,
    NoBok,
    NoNyn,
    ZhGuoyu,
    ZhHakka,
    ZhMin,
    ZhMinNan,
    ZhXiang,
}

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

EnGbOed
IAmi
IBnn
IDefault
IEnochian
IHak
IKlingon
ILux
IMingo
INavajo
IPwn
ITao
ITay
ITsu
SgnBeFr
SgnBeNl
SgnChDe
ArtLojban
CelGaulish
NoBok
NoNyn
ZhGuoyu
ZhHakka
ZhMin
ZhMinNan
ZhXiang

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]

impl Copy for GrandfatheredTag[src]

impl Eq for GrandfatheredTag[src]

impl Hash for GrandfatheredTag[src]

impl Ord for GrandfatheredTag[src]

impl PartialEq<GrandfatheredTag> for GrandfatheredTag[src]

impl PartialOrd<GrandfatheredTag> for GrandfatheredTag[src]

impl StructuralEq for GrandfatheredTag[src]

impl StructuralPartialEq for GrandfatheredTag[src]

impl<'a> TryFrom<&'a [u8]> for GrandfatheredTag[src]

type Error = Error

The type returned in the event of a conversion error.

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, 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.