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]

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

Formats the value using the given formatter. Read more

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

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

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T> SubEnvironment for AtomicArgsEnv<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 AtomicArgsEnv<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 AtomicArgsEnv<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 AtomicArgsEnv<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 AtomicArgsEnv<T> where
    T: Send + Sync

impl<T> Sync for AtomicArgsEnv<T> where
    T: Send + Sync