pub fn remove_tab(&mut self, id: &str) -> Result<(), error::IdNotFound> {
        if self.map.remove(id).is_some() {
            if let Some(key) = &self.current_id {
                if key == id {
                    // Current id no longer valid
                    self.current_id = None;
                }
            }
            // remove_key experimental
            self.key_order.retain(|k| k != id);
            self.invalidated = true;
            Ok(())
        } else {
            Err(error::IdNotFound{id: id.to_owned()})
        }
    }
/// Removes a tab with the given id from the `TabView`.
/// If the removed tab is active at the moment, the `TabView` will unfocus it and
/// the focus needs to be set manually afterwards, or a new view has to be inserted.
Removes a tab with the given id from the `TabView`.
If the removed tab is active at the moment, the `TabView` will unfocus it and
the focus needs to be set manually afterwards, or a new view has to be inserted.
Removes a tab with the given id from the ` TabView ` . If the removed tab is active at the moment the ` TabView ` will unfocus it and the focus needs to be set manually afterwards or a new view has to be inserted .
pub fn remove_tab(&mut self, id: &str) -> Result<(), error::IdNotFound> {
        if self.map.remove(id).is_some() {
            if let Some(key) = &self.current_id {
                if key == id {
                    // Current id no longer valid
                    self.current_id = None;
                }
            }
            // remove_key experimental
            self.key_order.retain(|k| k != id);
            self.invalidated = true;
            Ok(())
        } else {
            Err(error::IdNotFound{id: id.to_owned()})
        }
    }
pub fn remove_tab ( & mut self , id : & str ) -> Result < ( ) , error :: IdNotFound > { if self . map . remove ( id ) . is_some ( ) { if let Some ( key ) = & self . current_id { if key == id { // Current id no longer valid self . current_id = None ; } } // remove_key experimental self . key_order . retain ( | k | k != id ) ; self . invalidated = true ; Ok ( ( ) ) } else { Err ( error :: IdNotFound { id : id . to_owned ( ) } ) } }
Removes a tab with the given id from the `TabView`.
Removes a tab with the given id from the ` TabView ` .
&mut self
id
&str