Struct CommandArguments

Source
pub struct CommandArguments { /* private fields */ }
👎Deprecated since 0.3.0: Use standalone functions in rs_args.

Implementations§

Source§

impl CommandArguments

Source

pub fn new(arguments: Vec<Argument>) -> CommandArguments

Source

pub fn from_input(input: &str) -> Result<CommandArguments, LexicalError>

Source

pub fn default_new() -> Result<CommandArguments, LexicalError>

Source

pub fn get_named(&self, name: &str) -> Option<&str>

👎Deprecated since 0.3.0: Use rs_args::get_named instead.
Source

pub fn get_positional(&self, position: usize) -> Option<&str>

👎Deprecated since 0.3.0: Use rs_args::get_positional instead.
Source

pub fn get_positional_count(&self) -> usize

👎Deprecated since 0.3.0: Use rs_args::get_positional_count instead.
Source

pub fn get_positional_values(&self) -> Vec<&str>

👎Deprecated since 0.3.0: Use rs_args::get_positional_values instead.
Source

pub fn get_named_count(&self) -> usize

👎Deprecated since 0.3.0: Use rs_args::get_named_count instead.
Source

pub fn get_named_values(&self) -> Vec<&str>

👎Deprecated since 0.3.0: Use rs_args::get_named_values instead.
Source

pub fn get_all(&self) -> Vec<Argument>

👎Deprecated since 0.3.0: Use rs_args::parse_arguments instead.
Source

pub fn get_flag_names(&self) -> Vec<&str>

👎Deprecated since 0.3.0: Use rs_args::get_flag_names instead.
Source

pub fn get_flags(&self) -> Vec<Argument>

👎Deprecated since 0.3.0: Use rs_args::get_flags instead.
Source

pub fn has_flag(&self, name: &str) -> bool

👎Deprecated since 0.3.0: Use rs_args::get_flag_names instead.
Source

pub fn has_named(&self, name: &str) -> bool

👎Deprecated since 0.3.0: Use rs_args::has_named instead.
Source

pub fn has_positional(&self, position: usize) -> bool

👎Deprecated since 0.3.0: Use rs_args::has_positional instead.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.