Struct Args
#[must_use = "iterators are lazy and do nothing unless consumed"]
pub struct Args { pub(in ::env) inner: ArgsOs }
An iterator over the arguments of a process, yielding a String value for
each argument.
This struct is created by env::args(). See its documentation
for more.
The first element is traditionally the path of the executable, but it can be set to arbitrary text, and might not even exist. This means this property should not be relied upon for security purposes.
Fields
inner: ArgsOs
Trait Implementations
impl !Send for Args
impl !Sync for Args
impl Debug for Args
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl DoubleEndedIterator for Args
fn next_back(&mut self) -> Option<String>
impl ExactSizeIterator for Args
fn len(&self) -> usizefn is_empty(&self) -> bool
impl Iterator for Args
type Item = String;fn next(&mut self) -> Option<String>fn size_hint(&self) -> (usize, Option<usize>)
Auto Trait Implementations
impl Freeze for Args
impl RefUnwindSafe for Args
impl Unpin for Args
impl UnsafeUnpin for Args
impl UnwindSafe for Args
Blanket Implementations
impl<I> IntoIterator for Args
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<T> Any for Args
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Args
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Args
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for Args
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for Args
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for Args
impl<T, U> Into<U> for Args
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Args
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Args
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>