[][src]Struct langtag::ExtensionsMut

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

Mutable reference to extension subtags.

Implementations

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

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

Insert a new subtag for the given extension singleton without duplication.

Returns true if the extension subtag has been added, or false if it was already present.

pub fn remove(&mut self, singleton: Singleton) -> bool[src]

Remove the extension identified by the given singleton.

Return true if the extension was present and false otherwise (in which case the language tag is left unchanged).

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

Remove the given extension subtag.

Return true if the extension subtag was present and false otherwise (in which case the language tag is left unchanged).

Auto Trait Implementations

impl<'a> RefUnwindSafe for ExtensionsMut<'a>[src]

impl<'a> Send for ExtensionsMut<'a>[src]

impl<'a> Sync for ExtensionsMut<'a>[src]

impl<'a> Unpin for ExtensionsMut<'a>[src]

impl<'a> !UnwindSafe for ExtensionsMut<'a>[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, 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.