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: extract_url_and_global.rs
    path of file: ./repos/rspack/crates/rspack_core/src/utils
    
    the code of the file until where you have to start completion: use rspack_error::{error_bail, Result};

#[derive(Debug)]
pub struct UrlAndGlobal<'a> {
  pub url: &'a str,
  pub global: &'a str,
}

pub fn extrac
    
pub fn extract_url_and_global(value: &str) -> Result<UrlAndGlobal> {
  let index = value.find('@');
  if let Some(index) = index
    && index != 0
  {
    return Ok(UrlAndGlobal {
      url: &value[index + 1..],
      global: &value[0..index],
    });
  }
  error_bail!("Invalid request \"{}\"", value)
}