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: app.rs
    path of file: ./repos/valence/tools/packet_inspector/src
    
    the code of the file until where you have to start completion: use std::net::SocketAddr;
use std::sync::{Arc, RwLock};

use egui_dock::{DockArea, NodeIndex, Style
    
    pub fn new(cc: &eframe::CreationContext<'_>) -> Self {
        let ctx = cc.egui_ctx.clone();

        // Default Application Layout
        let mut tree: Tree<Box<dyn Tab>> = Tree::new(vec![Box::new(connection::Connection::new())]);

        let [a, b] = tree.split_right(
            NodeIndex::root(),
            0.3,
            vec![Box::new(packet_list::PacketList::new())],
        );

        let [_, _] = tree.split_below(a, 0.25, vec![Box::new(filter::Filter::new())]);
        let [_, _] = tree.split_below(
            b,
            0.5,
            vec![
                Box::new(text_viewer::TextView::new()),
                Box::new(hex_viewer::HexView::new()),
            ],
        );

        // Persistent Storage
        let mut shared_state = SharedState::new(ctx);

        if let Some(storage) = cc.storage {
            if let Some(value) = eframe::get_value::<SharedState>(storage, eframe::APP_KEY) {
                shared_state = value.merge(shared_state);
            }
        }

        let autostart = shared_state.autostart;
        let shared_state = Arc::new(RwLock::new(shared_state));

        // Event Handling
        handle_events(shared_state.clone());

        if autostart {
            let state = shared_state.read().unwrap();
            state.send_event(Event::StartListening);
        }

        // Consumer thread

        // Tab Viewer
        let tab_viewer = TabViewer {
            shared_state: shared_state.clone(),
        };

        Self {
            shared_state,
            tree,
            tab_viewer,
        }
    }