pub fn add_tab_at<T: View>(&mut self, view: NamedView<T>, pos: usize) {
        let id = view.name().to_owned();
        self.map.insert(id.clone(), Box::new(view));
        if let Some(sender) = &self.active_key_tx {
            match sender.send(id.clone()) {
                Ok(_) => {}
                Err(send_err) => debug!(
                    "Could not send new key to receiver in TabBar, has it been dropped? {}",
                    send_err
                ),
            }
        }
        self.current_id = Some(id.clone());
        if self.key_order.len() > pos {
            self.key_order.insert(pos, id)
        } else {
            self.key_order.push(id);
        }
    }
/// Add a new tab at a given position.
/// The new tab will be set active and will be the visible tab for this tab view.
///
/// This is designed to not fail, if the given position is greater than the number of current tabs, it simply will be appended.
Add a new tab at a given position.
The new tab will be set active and will be the visible tab for this tab view.

This is designed to not fail, if the given position is greater than the number of current tabs, it simply will be appended.
Add a new tab at a given position . The new tab will be set active and will be the visible tab for this tab view . This is designed to not fail if the given position is greater than the number of current tabs it simply will be appended .
pub fn add_tab_at<T: View>(&mut self, view: NamedView<T>, pos: usize) {
        let id = view.name().to_owned();
        self.map.insert(id.clone(), Box::new(view));
        if let Some(sender) = &self.active_key_tx {
            match sender.send(id.clone()) {
                Ok(_) => {}
                Err(send_err) => debug!(
                    "Could not send new key to receiver in TabBar, has it been dropped? {}",
                    send_err
                ),
            }
        }
        self.current_id = Some(id.clone());
        if self.key_order.len() > pos {
            self.key_order.insert(pos, id)
        } else {
            self.key_order.push(id);
        }
    }
pub fn add_tab_at < T : View > ( & mut self , view : NamedView < T > , pos : usize ) { let id = view . name ( ) . to_owned ( ) ; self . map . insert ( id . clone ( ) , Box :: new ( view ) ) ; if let Some ( sender ) = & self . active_key_tx { match sender . send ( id . clone ( ) ) { Ok ( _ ) => { } Err ( send_err ) => debug ! ( " " send_err ) , } } self . current_id = Some ( id . clone ( ) ) ; if self . key_order . len ( ) > pos { self . key_order . insert ( pos , id ) } else { self . key_order . push ( id ) ; } }
Add a new tab at a given position.
Add a new tab at a given position .
&mut self
view
NamedView<T>
pos
usize