pub struct Args<T> { /* private fields */ }
Expand description
A stream of arguments.
Implementations§
Source§impl<T> Args<T>
impl<T> Args<T>
Sourcepub fn from(args: T) -> Self
pub fn from(args: T) -> Self
Create an argument stream from an argument iterator. The program name should not be included in the argument stream.
use std::env;
use simpleargs::Args;
fn main() {
let mut args_os = env::args_os();
args_os.next(); // Discard program name.
let args = Args::from(args_os);
}
Auto Trait Implementations§
impl<T> Freeze for Args<T>where
T: Freeze,
impl<T> RefUnwindSafe for Args<T>where
T: RefUnwindSafe,
impl<T> Send for Args<T>where
T: Send,
impl<T> Sync for Args<T>where
T: Sync,
impl<T> Unpin for Args<T>where
T: Unpin,
impl<T> UnwindSafe for Args<T>where
T: UnwindSafe,
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