Struct palex::StringInput[][src]

pub struct StringInput<I: Iterator<Item = String> = Args> { /* fields omitted */ }

The default input type for argument parsing. This is generic over its iterator type and can be used with std::env::args. See StringInput::new() for more information.

Getting the current token and token kind is very cheap. Bumping the token is a bit more expensive, since it involves more complicated logic and might re-allocate.

Implementations

impl<I: Iterator<Item = String>> StringInput<I>[src]

pub fn new(iter: I) -> Self[src]

Creates a new instance of this input.

Example:

let mut _input = StringInput::new(std::env::args());

You probably want to discard the first argument in this case, which is just the path to the executable.

Trait Implementations

impl<I: Iterator<Item = String>> Input for StringInput<I>[src]

Auto Trait Implementations

impl<I> RefUnwindSafe for StringInput<I> where
    I: RefUnwindSafe
[src]

impl<I> Send for StringInput<I> where
    I: Send
[src]

impl<I> Sync for StringInput<I> where
    I: Sync
[src]

impl<I> Unpin for StringInput<I> where
    I: Unpin
[src]

impl<I> UnwindSafe for StringInput<I> where
    I: UnwindSafe
[src]

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