Enum transip_command::VpsCommand
source · pub enum VpsCommand {
List,
Action(String, VpsAction),
}
Variants§
List
Example
use transip_command::{VpsCommand, TransipCommand};
let commandline = "vps list";
assert_eq!(
commandline.parse::<TransipCommand>().unwrap(),
TransipCommand::Vps(VpsCommand::List),
);
Action(String, VpsAction)
Example
use transip_command::{TransipCommand, VpsAction, VpsCommand};
let commandline = "vps reset vps9374";
assert_eq!(
commandline.parse::<TransipCommand>().unwrap(),
TransipCommand::Vps(
VpsCommand::Action(
"vps9374".to_owned(),
VpsAction::Reset,
)
),
);
Trait Implementations§
source§impl Debug for VpsCommand
impl Debug for VpsCommand
source§impl Display for VpsCommand
impl Display for VpsCommand
source§impl FromStr for VpsCommand
impl FromStr for VpsCommand
source§impl PartialEq for VpsCommand
impl PartialEq for VpsCommand
source§fn eq(&self, other: &VpsCommand) -> bool
fn eq(&self, other: &VpsCommand) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for VpsCommand
Auto Trait Implementations§
impl RefUnwindSafe for VpsCommand
impl Send for VpsCommand
impl Sync for VpsCommand
impl Unpin for VpsCommand
impl UnwindSafe for VpsCommand
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more