[][src]Enum medusa::ArgType

pub enum ArgType {
    Flag(bool),
    Content(String),
}

Enum that define the type (or kind) of option arguments.

There are 2 types of this variant: Flag and Content.

Flag means that your arguments are only a variable that tells if it is exist (true) or not (false), since it only contains boolean value. For example, option parameter --wait will make your CLI program wait until the process are finished, otherwise it will run as a background process. Here, option --wait will have value of true because it is called when executing the program.

Content means that your arguments consist of a String instance that can be processed later (hence the name, Content). For example, option parameter --user nobody will make your CLI program run as user nobody. Here, option --user will have argument value of nobody since this argument is passed to the option --user.

Variants

Flag(bool)
Content(String)

Trait Implementations

impl Clone for ArgType[src]

Auto Trait Implementations

impl RefUnwindSafe for ArgType

impl Send for ArgType

impl Sync for ArgType

impl Unpin for ArgType

impl UnwindSafe for ArgType

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.