[][src]Struct langtag::LanguageExtensionMut

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

Mutable reference to extended language subtags.

Implementations

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

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

Return a non-mutable reference to the extended language subtags.

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

Checks if no extended language subtags are defined.

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

Checks if no more extended language subtags can be inserted.

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: &ExtendedLangTag) -> bool[src]

Insert a new subtag if it there is room for it and is not already present.

Return true if the subtag has been inserted, and false if the subtag was already present or if there already are 3 extended language subtags.

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.