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: mod.rs
    path of file: ./repos/vector/src/tap
    
    the code of the file until where you have to start completion: //! Tap subcommand
mod cmd;

use clap::Parser;
pub(crate) use cmd::cmd;
pub use cmd::tap;
use url::Url;
use vector_lib::api_client::gql::TapEncodingFormat;

use crate::config::api::def
    
    pub fn web_socket_url(&self) -> Url {
        let mut url = self.url();
        url.set_scheme(match url.scheme() {
            "https" => "wss",
            _ => "ws",
        })
        .expect("Couldn't build WebSocket URL. Please report.");

        url
    }