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: ip_tables.rs
    path of file: ./repos/mirrord/mirrord/agent/src/steal
    
    the code of the file until where you have to start completion: use std::{
    fmt::Debug,
    sync::{Arc, LazyLock},
};

use enum_dispatch::enum_dispatch;
use mirrord_protocol::{MeshVendor, Port};
use rand::distributions::{Alphanumeric, DistString};
use tracing::warn;

use crate::{
    error::{AgentError, Result},
    steal::ip_tables::{
        flush_connections::FlushConnections,
        mesh::{MeshRedirect, MeshVendorExt},
        prerouting::PreroutingRedirect,
        redirect::Redirect,
        standard::StandardRedirect,
    },
};

#[cfg(not(target_os = "linux"))]
mod iptables {
    pub struct IPTables;

    impl IPTables {
        pub fn list(&self, _: &str, _: &str) -> Result<Vec<String>, String> {
            todo!()
        }
        pub fn insert(&self, _: &str, _: &str, _: &str, _: i32) -> Result<(), String> {
            todo!()
        }
        pub fn append(&self, _: &str, _: &str, _: &str) -> Result<(), String> {
            todo!()
        }
        pub fn delete(&self, _: &str, _: &str, _: &str) -> Result<(), String> {
            todo!()
        }

        pub fn new_chain(&self, _: &str, _: &str) -> Result<(), String> {
            todo!()
        }
        pub fn delete_chain(&self, _: &str, _: &str) -> Result<(), String> {
            todo!()
        }
        pub fn flush_chain(&self, _: &str, _: &str) -> Result<(), String> {
            todo!()
        }
    }
}

pub(crate) mod chain;
pub(crate) mod flush_connections;
pub(crate) mod mesh;
pub(crate) mod output;
pub(crate) mod prerouting;
pub(crate) mod redirect;
pub(crate) mod standard;

pub static IPTABLE_PREROUTING_ENV: &str = "MIRRORD_IPTABLE_PREROUTING_NAME";
pub sta
    
    async fn default() {
        let mut mock = MockIPTables::new();

        mock.expect_list_rules()
            .with(eq("OUTPUT"))
            .returning(|_| Ok(vec![]));

        mock.expect_create_chain()
            .with(str::starts_with("MIRRORD_INPUT_"))
            .times(1)
            .returning(|_| Ok(()));

        mock.expect_insert_rule()
            .with(
                str::starts_with("MIRRORD_INPUT_"),
                eq("-m tcp -p tcp --dport 69 -j REDIRECT --to-ports 420"),
                eq(1),
            )
            .times(1)
            .returning(|_, _, _| Ok(()));

        mock.expect_create_chain()
            .with(str::starts_with("MIRRORD_STANDARD_"))
            .times(1)
            .returning(|_| Ok(()));

        mock.expect_insert_rule()
            .with(
                str::starts_with("MIRRORD_STANDARD_"),
                str::starts_with("-m owner --gid-owner"),
                eq(1),
            )
            .times(1)
            .returning(|_, _, _| Ok(()));

        mock.expect_insert_rule()
            .with(
                str::starts_with("MIRRORD_STANDARD_"),
                eq("-o lo -m tcp -p tcp --dport 69 -j REDIRECT --to-ports 420"),
                eq(2),
            )
            .times(1)
            .returning(|_, _, _| Ok(()));

        mock.expect_add_rule()
            .with(eq("PREROUTING"), str::starts_with("-j MIRRORD_INPUT_"))
            .times(1)
            .returning(|_, _| Ok(()));

        mock.expect_add_rule()
            .with(eq("OUTPUT"), str::starts_with("-j MIRRORD_STANDARD_"))
            .times(1)
            .returning(|_, _| Ok(()));

        mock.expect_remove_rule()
            .with(
                str::starts_with("MIRRORD_INPUT_"),
                eq("-m tcp -p tcp --dport 69 -j REDIRECT --to-ports 420"),
            )
            .times(1)
            .returning(|_, _| Ok(()));

        mock.expect_remove_rule()
            .with(
                str::starts_with("MIRRORD_STANDARD_"),
                eq("-o lo -m tcp -p tcp --dport 69 -j REDIRECT --to-ports 420"),
            )
            .times(1)
            .returning(|_, _| Ok(()));

        mock.expect_remove_rule()
            .with(eq("PREROUTING"), str::starts_with("-j MIRRORD_INPUT_"))
            .times(1)
            .returning(|_, _| Ok(()));

        mock.expect_remove_rule()
            .with(eq("OUTPUT"), str::starts_with("-j MIRRORD_STANDARD_"))
            .times(1)
            .returning(|_, _| Ok(()));

        mock.expect_remove_chain()
            .with(str::starts_with("MIRRORD_INPUT_"))
            .times(1)
            .returning(|_| Ok(()));

        mock.expect_remove_chain()
            .with(str::starts_with("MIRRORD_STANDARD_"))
            .times(1)
            .returning(|_| Ok(()));

        let ipt = SafeIpTables::create(mock, false)
            .await
            .expect("Create Failed");

        assert!(ipt.add_redirect(69, 420).await.is_ok());

        assert!(ipt.remove_redirect(69, 420).await.is_ok());

        assert!(ipt.cleanup().await.is_ok());
    }