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

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

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

Uses Arc internally. If Send and Sync is not required of the implementation, see env::ArgsEnv as a cheaper alternative.

Methods

impl<T> AtomicArgsEnv<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 AtomicArgsEnv<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: PartialEq> PartialEq for AtomicArgsEnv<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 AtomicArgsEnv<T>
[src]

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

[src]

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

impl<T> Clone for AtomicArgsEnv<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 AtomicArgsEnv<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 AtomicArgsEnv<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 AtomicArgsEnv<T>
[src]

A collection of arguments to set.

[src]

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

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

[src]

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