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: key.rs
    path of file: ./repos/gpg-tui/src/gpg
    
    the code of the file until where you have to start completion: use crate::gpg::handler;
use clap::ValueEnum;
use gpgme::{Key, SignatureNotation, Subkey, UserId, UserIdSignature};
use serde::{Deserialize, Serialize};
use std::fmt::{Display, Formatter, Result as FmtResult};
use std::str::FromStr;

/// Type of the key.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum KeyType {
	/// Public key.
	Public,
	/// Secret (private) key.
	Secret,
}

impl Display for KeyType {
	fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
		write!(
			f,
			"{}",
			match self {
				Self::Public => "pub",
				Self::Secret => "sec",
			}
		)
	}
}

impl FromStr for KeyType {
	type Err = ();
	fn from_str(s: &str) -> Result<Self, Self::Err> {
		for key_type in &[
    
	fn test_gpg_key() -> Result<()> {
		let args = Args::default();
		let config = GpgConfig::new(&args)?;
		let mut context = GpgContext::new(config)?;
		let mut keys =
			context.get_keys(KeyType::Public, None, KeyDetail::default())?;
		let key = &mut keys[0];
		key.detail.increase();
		assert_eq!(KeyDetail::Standard, key.detail);
		assert_eq!(Ok(key.detail), KeyDetail::from_str("standard", true));
		key.detail.increase();
		assert_eq!(KeyDetail::Full, key.detail);
		assert_eq!("full", key.detail.to_string());
		assert!(key
			.get_subkey_info(Some(""), true)
			.join("\n")
			.contains(&key.get_id().replace("0x", "")));
		assert!(key
			.get_subkey_info(Some(""), false)
			.join("\n")
			.contains(&key.get_fingerprint()));
		assert!(key
			.get_user_info(false)
			.join("\n")
			.contains(&key.get_user_id()));
		Ok(())
	}