Struct conch_runtime::env::ArgsEnv [] [src]

pub struct ArgsEnv<T> { /* fields omitted */ }

An environment module for setting and getting shell and function arguments.

Uses Rc internally. For a possible Send and Sync implementation, see env::atomic::ArgsEnv.

Methods

impl<T> ArgsEnv<T>
[src]

[src]

Constructs a new environment and initializes it with the name of the current process as the shell name, and no arguments.

[src]

Constructs a new environment and initializes it with the provided name and no arguments.

[src]

Constructs a new environment and initializes it with the provided name and positional arguments.

Trait Implementations

impl<T: Debug> Debug for ArgsEnv<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: PartialEq> PartialEq for ArgsEnv<T>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<T: Eq> Eq for ArgsEnv<T>
[src]

impl<T: From<String>> Default for ArgsEnv<T>
[src]

[src]

Returns the "default value" for a type. Read more

impl<T> Clone for ArgsEnv<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T> SubEnvironment for ArgsEnv<T>
[src]

[src]

Create a new sub-environment, which starts out idential to its parent, but any changes on the new environment will not be reflected on the parent. Read more

impl<T: Clone> ArgumentsEnvironment for ArgsEnv<T>
[src]

The type of arguments this environment holds.

[src]

Get the name of the shell.

[src]

Get an argument at any index. Arguments are 1-indexed since the shell variable $0 refers to the shell's name. Thus the first real argument starts at index 1. Read more

[src]

Get the number of current arguments, NOT including the shell name.

[src]

Get all current arguments as a possibly owned slice.

impl<T: Clone> SetArgumentsEnvironment for ArgsEnv<T>
[src]

A collection of arguments to set.

[src]

Changes the environment's arguments to new_args and returns the old arguments.