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]

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

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

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

Trait Implementations

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

Formats the value using the given formatter. Read more

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

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

This method tests for !=.

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

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

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T> SubEnvironment for ArgsEnv<T>
[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.

Get the name of the shell.

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

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

Get all current arguments as a possibly owned slice.

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

A collection of arguments to set.

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

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

Shift parameters such that the positional parameter n will hold the value of the positional parameter n + amt. Read more

Auto Trait Implementations

impl<T> !Send for ArgsEnv<T>

impl<T> !Sync for ArgsEnv<T>