RawArgs

Trait RawArgs 

Source
pub trait RawArgs: Debug + Sealed {
    // Required methods
    fn get(&self, index: usize) -> Option<&OsStr>;
    fn len(&self) -> usize;
    fn is_empty(&self) -> bool;
}
Expand description

Accessor for unparsed arguments

Required Methods§

Source

fn get(&self, index: usize) -> Option<&OsStr>

Returns a reference to an element or subslice depending on the type of index.

  • If given a position, returns a reference to the element at that position or None if out of bounds.
  • If given a range, returns the subslice corresponding to that range, or None if out of bounds.
Source

fn len(&self) -> usize

Returns the number of elements in the slice.

Source

fn is_empty(&self) -> bool

Returns true if the slice has a length of 0.

Implementations on Foreign Types§

Source§

impl<S> RawArgs for &[S]
where S: AsRef<OsStr> + Debug,

Source§

fn get(&self, index: usize) -> Option<&OsStr>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl<S> RawArgs for Vec<S>
where S: AsRef<OsStr> + Debug,

Source§

fn get(&self, index: usize) -> Option<&OsStr>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl<const C: usize, S> RawArgs for [S; C]
where S: AsRef<OsStr> + Debug,

Source§

fn get(&self, index: usize) -> Option<&OsStr>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Implementors§