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: macos.rs
    path of file: ./repos/espanso/espanso/src/cli/service
    
    the code of the file until where you have to start completion: /*
 * This file is part of espans
    
pub fn is_registered() -> bool {
  let home_dir = dirs::home_dir().expect("could not get user home directory");
  let library_dir = home_dir.join("Library");
  let agents_dir = library_dir.join("LaunchAgents");
  let plist_file = agents_dir.join(SERVICE_PLIST_FILE_NAME);
  plist_file.is_file()
}