Enum transip_command::ProductCommand
source · pub enum ProductCommand {
List,
Elements(String),
}
Variants§
List
Example
use transip_command::{ProductCommand, TransipCommand};
let commandline = "product list";
assert_eq!(
commandline.parse::<TransipCommand>().unwrap(),
TransipCommand::Product(ProductCommand::List),
);
Elements(String)
Example
use transip_command::{ProductCommand, TransipCommand};
let commandline = "product elements haip-basic-contract";
assert_eq!(
commandline.parse::<TransipCommand>().unwrap(),
TransipCommand::Product(
ProductCommand::Elements(
"haip-basic-contract".to_owned(),
)
),
);
Trait Implementations§
source§impl Debug for ProductCommand
impl Debug for ProductCommand
source§impl Display for ProductCommand
impl Display for ProductCommand
source§impl FromStr for ProductCommand
impl FromStr for ProductCommand
source§impl PartialEq for ProductCommand
impl PartialEq for ProductCommand
source§fn eq(&self, other: &ProductCommand) -> bool
fn eq(&self, other: &ProductCommand) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ProductCommand
Auto Trait Implementations§
impl RefUnwindSafe for ProductCommand
impl Send for ProductCommand
impl Sync for ProductCommand
impl Unpin for ProductCommand
impl UnwindSafe for ProductCommand
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