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