[][src]Struct langtag::PrivateUseTag

pub struct PrivateUseTag<T: ?Sized = [u8]> { /* fields omitted */ }

Private use tag.

Implementations

impl<T: AsRef<[u8]>> PrivateUseTag<T>[src]

pub fn new(t: T) -> Result<PrivateUseTag<T>, T>[src]

Parse and use the given data as a private use tag.

impl PrivateUseTag[src]

pub fn parse<'a, T: AsRef<[u8]> + ?Sized>(
    bytes: &T
) -> Result<&'a PrivateUseTag, Error>
[src]

Parse and borrow the given data as a private use tag.

impl<T: AsRef<[u8]> + ?Sized> PrivateUseTag<T>[src]

pub fn as_bytes(&self) -> &[u8][src]

Returns the bytes representation of this private use tag.

pub fn as_str(&self) -> &str[src]

Returns the string representation of this private use tag.

pub fn subtags(&self) -> &PrivateUseSubtags[src]

Iterate through the subtags.

impl<T: AsMut<Vec<u8>>> PrivateUseTag<T>[src]

pub fn subtags_mut(&mut self) -> PrivateUseSubtagsMut<'_>[src]

Modify the subtags.

Trait Implementations

impl<T: AsRef<[u8]> + ?Sized> AsRef<[u8]> for PrivateUseTag<T>[src]

impl<T: AsRef<[u8]> + ?Sized> Debug for PrivateUseTag<T>[src]

impl<T: AsRef<[u8]> + ?Sized> Display for PrivateUseTag<T>[src]

impl<T: AsRef<[u8]> + ?Sized> Eq for PrivateUseTag<T>[src]

impl<T: AsRef<[u8]> + ?Sized> Hash for PrivateUseTag<T>[src]

impl<T: AsRef<[u8]> + ?Sized, U: AsRef<[u8]> + ?Sized> PartialEq<U> for PrivateUseTag<T>[src]

Auto Trait Implementations

impl<T: ?Sized> RefUnwindSafe for PrivateUseTag<T> where
    T: RefUnwindSafe
[src]

impl<T: ?Sized> Send for PrivateUseTag<T> where
    T: Send
[src]

impl<T: ?Sized> Sync for PrivateUseTag<T> where
    T: Sync
[src]

impl<T: ?Sized> Unpin for PrivateUseTag<T> where
    T: Unpin
[src]

impl<T: ?Sized> UnwindSafe for PrivateUseTag<T> where
    T: UnwindSafe
[src]

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> ToString for T where
    T: Display + ?Sized
[src]

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.