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: api.rs
    path of file: ./repos/axos/crates/axos/src/engine
    
    the code of the file until where you have to start completion: //! Engine API
//!
//!
//! This module was largely built based off [magi][magi].
//!
//! [magi]: https://github.com/a16z/magi

use axos_config::consts::DEFAULT_AUTH_PORT;
use axos_primitives::jwt::JwtSecret;
use axos_primitives::Gen
    
    fn split_base_url(base_url: impl Into<GenericString>) -> Result<(GenericString, u16)> {
        let binding = base_url.into();
        let prefix = binding.split_once("http://").map(|_| "http://").unwrap_or(
            binding
                .split_once("https://")
                .map(|_| "https://")
                .unwrap_or(""),
        );
        let binding = binding.strip_prefix(prefix).unwrap_or(&binding);

        // Split the binding into the address and port
        let mut binding = binding.split(':');
        let addr = binding.next().ok_or_else(|| {
            anyhow::anyhow!(
                "Invalid base url. \
            Must be of the form \"http://<addr>:<port>\""
            )
        })?;
        if addr.is_empty() {
            return Err(anyhow::anyhow!(
                "Empty addr. Must be of the form \"http://<addr>:<port>\""
            ));
        }
        let port = binding.next().unwrap_or("8551");
        let port = port
            .parse::<u16>()
            .map_err(|_| anyhow::anyhow!("Invalid port in base url. Must be a valid u16"))?;
        let addr = format!("{}{}:{}", prefix, addr, port);
        Ok((addr, port))
    }