[][src]Struct langtag::PrivateUseSubtagsMut

pub struct PrivateUseSubtagsMut<'a> { /* fields omitted */ }

Mutable reference to private use subtags.

Implementations

impl<'a> PrivateUseSubtagsMut<'a>[src]

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

Returns a non-mutable reference to the private use subtags.

pub fn is_empty(&self) -> bool[src]

Checks if the subtag list is empty.

pub fn contains<T: AsRef<[u8]> + ?Sized>(&self, subtag: &T) -> bool[src]

Checks if the given subtag is present.

pub fn insert(&mut self, subtag: &PrivateUseSubtag) -> bool[src]

Insert a new subtag if it is not already present.

Return true if the subtag has been inserted, and false if the subtag was already present.

pub fn remove<T: AsRef<[u8]> + ?Sized>(&mut self, subtag: &T) -> bool[src]

Remove all occurences of the given subtag.

Return true if the subtag was present and false otherwise.

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