pub(crate) enum Options {
Create {
file_path: FilePathArg,
file_size: Option<u64>,
key_path: Option<PathBuf>,
encryption_algorithm: Option<EncryptionAlgorithm>,
force_create: bool,
},
Write {
file_path: FilePathArg,
data_path: PathBuf,
file_id: FileIdArg,
key_path: KeyPathArg,
allow_overwrite: bool,
},
Dump {
file_path: FilePathArg,
data_path: Option<PathBuf>,
file_id: FileIdArg,
key_path: KeyPathArg,
raw_stdout: bool,
},
DumpHeaders {
file_path: FilePathArg,
},
QuerySize {
file_path: FilePathArg,
file_id: FileIdArg,
},
UpdateKey {
file_path: FilePathArg,
key_path: PathBuf,
new_key_path: PathBuf,
encryption_algorithm: EncryptionAlgorithm,
},
Encrypt {
file_path: FilePathArg,
key_path: PathBuf,
encryption_algorithm: EncryptionAlgorithm,
},
QueryEncryption {
file_path: FilePathArg,
},
UefiNvram {
operation: UefiNvramOperation,
},
}
Variants§
Create
Create and initialize filepath
as a VMGS file of size filesize
.
keypath
and encryptionalgorithm
must both be specified if encrypted
guest state is required.
Fields
file_path: FilePathArg
key_path: Option<PathBuf>
Encryption key file path. The file must contain a key that is 32 bytes long.
encryptionalgorithm
must also be specified when using this flag.
encryption_algorithm: Option<EncryptionAlgorithm>
Encryption algorithm. Currently AES_GCM is the only algorithm supported.
keypath
must also be specified when using this flag.
Write
Write data into the specified file ID of the VMGS file.
The proper key file must be specified to write encrypted data.
Dump
Dump/read data from the specified file ID of the VMGS file.
The proper key file must be specified to read encrypted data. If the data is encrypted and no key is specified, the data will be dumped without decrypting.
DumpHeaders
Dump headers of the VMGS file at filepath
to the console.
Fields
file_path: FilePathArg
QuerySize
Get the size of the specified fileid
within the VMGS file
UpdateKey
Replace the current encryption key with a new provided key
Both key files must contain a key that is 32 bytes long.
Fields
file_path: FilePathArg
encryption_algorithm: EncryptionAlgorithm
Encryption algorithm. Currently AES_GCM is the only algorithm supported.
Encrypt
Encrypt an existing VMGS file
Fields
file_path: FilePathArg
encryption_algorithm: EncryptionAlgorithm
Encryption algorithm. Currently AES_GCM is the only algorithm supported.
QueryEncryption
Query whether a VMGS file is encrypted
Fields
file_path: FilePathArg
UefiNvram
UEFI NVRAM operations
Fields
operation: UefiNvramOperation
Trait Implementations§
Source§impl FromArgMatches for Options
impl FromArgMatches for Options
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§impl Parser for Options
impl Parser for Options
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
Source§impl Subcommand for Options
impl Subcommand for Options
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command
] so it can instantiate self
via
[FromArgMatches::update_from_arg_matches_mut
] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self
can parse a specific subcommand