Struct riot_wrappers::shell::Args[][src]

pub struct Args<'a>(_);
Expand description

Newtype around an (argc, argv) C style string array that presents itself as much as an &'a [&'a str] as possible. (Slicing is not implemented for reasons of laziness).

As this is used with the command line parser, it presents the individual strings as &str infallibly. If non-UTF8 input is received, a variation of from_utf8_lossy is applied: The complete string (rather than just the bad characters) is reported as “�”, but should have the same effect: Be visible as an encoding error without needlessly complicated error handling for niche cases.

Implementations

Create the slice from its parts.

Unsafe

argv must be a valid pointer, and its first argc items must be valid pointers. The underlying char strings do not need to be valid UTF-8, but must be null terminated.

Returns an iterator over the arguments.

Returns the argument in the given position.

Length of the arguments list

Trait Implementations

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.