# ProcessEnvironmentBinding

`import { ProcessEnvironmentBinding } from "destack:process/binding";`

Environment binding family.

```ds title="ProcessEnvironmentBinding"
export interface ProcessEnvironmentBinding {
    getEnvironment(name: &'a readonly string): Result<^string | undefined, HostError>;
    listEnvironment(): Result<EnvironmentVariable[], HostError>;
    setEnvironment(name: &'a readonly string, value: &'b readonly string): Result<void, HostError>;
    removeEnvironment(name: &'a readonly string): Result<void, HostError>;
    getRawEnvironment(name: &'a readonly [uint8]): Result<uint8[] | undefined, HostError>;
    listRawEnvironment(): Result<RawEnvironmentVariable[], HostError>;
    setRawEnvironment(name: &'a readonly [uint8], value: &'b readonly [uint8]): Result<void, HostError>;
    removeRawEnvironment(name: &'a readonly [uint8]): Result<void, HostError>;
}
```

[language/library/src/process/binding/environment.ds:21:93](https://github.com/destack-sh/destack/blob/main/language/library/src/process/binding/environment.ds#L21-L93)

## Members

### `getEnvironment(name: &'a readonly string): Result<^string | undefined, HostError>`

Read an environment variable.

### `listEnvironment(): Result<EnvironmentVariable[], HostError>`

List environment variables.

### `setEnvironment(name: &'a readonly string, value: &'b readonly string): Result<void, HostError>`

Set an environment variable.

### `removeEnvironment(name: &'a readonly string): Result<void, HostError>`

Remove an environment variable.

### `getRawEnvironment(name: &'a readonly [uint8]): Result<uint8[] | undefined, HostError>`

Read a raw Unix environment variable.

### `listRawEnvironment(): Result<RawEnvironmentVariable[], HostError>`

List raw Unix environment variables.

### `setRawEnvironment(name: &'a readonly [uint8], value: &'b readonly [uint8]): Result<void, HostError>`

Set a raw Unix environment variable.

### `removeRawEnvironment(name: &'a readonly [uint8]): Result<void, HostError>`

Remove a raw Unix environment variable.
