pub enum CommandType {
Show 20 variants Create { append: bool, name: String, size: usize, }, Delete { name: String, disk: Option<String>, }, Rename { old: String, new: String, }, ListDisks { name: String, }, NC { name: String, port: u16, }, SSH { name: String, args: Option<Vec<String>>, }, Supervise { cdrom: Option<PathBuf>, name: String, }, Unsupervise { name: String, }, Run { headless: bool, detach: bool, cdrom: Option<PathBuf>, extra_disk: Option<PathBuf>, name: String, }, Shutdown { nowait: bool, name: String, }, QMP { name: String, command: String, arguments: Option<String>, }, List { running: bool, }, Supervised, Clone { config: bool, from: String, to: String, }, Import { format: String, name: String, from_file: PathBuf, }, Config(ConfigSubcommand), IsActive { name: String, }, Save { name: String, }, Load { name: String, }, ClearState { name: String, },
}

Variants§

§

Create

Fields

§append: bool

Append this VM image to an existing VM?

§name: String

Name of VM

§size: usize

Size in GB of VM image

Create vm with a sized image, or append storage to an existing VM

§

Delete

Fields

§name: String

Name of VM

§disk: Option<String>

(Optional) ID of disk to remove

Delete existing vm

§

Rename

Fields

§old: String

Original name of VM

§new: String

New name of VM

Rename VM to new name

§

ListDisks

Fields

§name: String

Name of VM

List all disks a VM has available

§

NC

Fields

§name: String

Name of VM

§port: u16

Port of VM

Open standard input to a port on the VM

§

SSH

Fields

§name: String

Name of VM

§args: Option<Vec<String>>

Arguments to pass to ssh program (use – to stop CLI processing)

Uses ssh_port configuration variable to SSH into the host

§

Supervise

Fields

§cdrom: Option<PathBuf>

ISO of CD-ROM image – will be embedded into supervision

§name: String

Name of VM

Configure supervision of an already existing VM

§

Unsupervise

Fields

§name: String

Name of VM

Remove supervision of an already existing vm

§

Run

Fields

§headless: bool

Run without a video window

§detach: bool

Do not wait for qemu to exit

§cdrom: Option<PathBuf>

ISO of CD-ROM image

§extra_disk: Option<PathBuf>

Supply an extra ISO image (useful for windows installations)

§name: String

Name of VM

Just run a pre-created VM; no systemd involved

§

Shutdown

Fields

§nowait: bool

Do not wait for the VM to terminate

§name: String

Name of VM

Gracefully shutdown a pre-created VM

§

QMP

Fields

§name: String

Name of VM

§command: String

Command to issue

§arguments: Option<String>

Arguments to send for command, JSON literal in single argument

Issue QMP commands to the guest

§

List

Fields

§running: bool

List only currently running VMs

Yield a list of VMs, one on each line

§

Supervised

Yield a list of supervised VMs, one on each line

§

Clone

Fields

§config: bool

Copy configuration as well

§from: String

VM to clone from

§to: String

VM to clone to

Clone one VM to another

§

Import

Fields

§format: String

Format of incoming image

§name: String

VM to import to

§from_file: PathBuf

VM image to import from

Import a VM from a VM image file

§

Config(ConfigSubcommand)

Show and manipulate VM configuration

§

IsActive

Fields

§name: String

Name of VM

Is this VM currently active?

§

Save

Fields

§name: String

Name of VM

Quickly save a snapshot of the named VM

§

Load

Fields

§name: String

Name of VM

Load the quick save of the named VM

§

ClearState

Fields

§name: String

Name of VM

Delete the quick save of the named VM

Trait Implementations§

source§

impl Clone for CommandType

source§

fn clone(&self) -> CommandType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CommandType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromArgMatches for CommandType

source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

impl Subcommand for CommandType

source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self. Read more
source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can update self. Read more
source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.