You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: navigation.rs
    path of file: ./repos/rio/frontends/rioterm/src/state
    
    the code of the file until where you have to start completion: use crate::constants::*;
use rio_backend::config::navigation::NavigationMode;
use rio_backend::sugarloaf::components::rect::Rect;
use rio_backend::sugarloaf::font::FONT_ID_BUILTIN;
use std::collections::HashMap;

pub struct Text {
    pub position: (f32, f32),
    pub content: String,
    pub font_id
    
    pub fn collapsed_tab(&mut self, titles: &HashMap<usize, [String; 3]>, len: usize) {
        if len <= 1 {
            return;
        }

        let mut initial_position = (self.width / self.scale) - PADDING_X_COLLAPSED_TABS;
        let position_modifier = 20.;
        for i in (0..len).rev() {
            let mut color = self.colors.inactive;
            let mut size = INACTIVE_TAB_WIDTH_SIZE;
            if i == self.current {
                color = self.colors.active;
                size = ACTIVE_TAB_WIDTH_SIZE;
            }

            if let Some(name_idx) = titles.get(&i) {
                if let Some(color_overwrite) = get_color_overwrite(
                    &self.color_automation,
                    &name_idx[0],
                    &name_idx[2],
                ) {
                    color = *color_overwrite;
                }
            }

            let renderable = Rect {
                position: [initial_position, 0.0],
                color,
                size: [30.0, size],
            };
            initial_position -= position_modifier;
            self.rects.push(renderable);
        }
    }