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: platform_plugin.rs
    path of file: ./repos/moon/nextgen/platform-plugin/src
    
    the code of the file until where you have to start completion: use moon_common::Id;
use moon_pdk_api::{MoonContext, SyncProjectInput, SyncProjectRecord, SyncWorkspaceInput};
use moon_plugin::{Plugin, PluginContainer, PluginId, PluginRegistration, PluginType};
use proto_core::Tool;
use rustc_hash::FxHashMap;
use std::sync::
    
    fn new(registration: PluginRegistration) -> miette::Result<Self> {
        let plugin = Arc::new(registration.container);

        Ok(Self {
            // Only create the proto tool instance if we know that
            // the WASM file has support for it!
            tool: if plugin.has_func("register_tool") {
                Some(Tool::new(
                    registration.id.clone(),
                    Arc::clone(&registration.proto_env),
                    Arc::clone(&plugin),
                )?)
            } else {
                None
            },
            id: registration.id,
            plugin,
        })
    }