Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
Snapshot · Oct 24, 2026 · Frozen documentation

EnvironmentEntry

Owns an exact native environment name and value without changing host state. Validation belongs to Environment.TrySet so rejected entries retain both owners. Names and values are immutable through this API; movement invalidates views. Concurrent reads require stable ownership; synchronize replacement/movement.

Sn is under heavy development. This reference includes the intended 1.0 design; features may be incomplete in the current compiler. Read the status →

Module std.process

import std.process;

Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.

EnvironmentEntry

pub final class EnvironmentEntry

Owns an exact native environment name and value without changing host state. Validation belongs to Environment.TrySet so rejected entries retain both owners. Names and values are immutable through this API; movement invalidates views. Concurrent reads require stable ownership; synchronize replacement/movement.

pub init(mut Name: NativeString, mut Value: NativeString)

pub init(mut Name: NativeString, mut Value: NativeString)

Adopts native name/value ownership without allocation or validation. Name: Owned exact name, transferred even when invalid for insertion. Value: Owned exact value, including empty values.

pub init(Source: readonly Self&) = delete;

pub init(Source: readonly Self&) = delete;

Rejects implicit allocating copies. Source: Existing owner.

pub init(Source: mut Self&&)

pub init(Source: mut Self&&)

Transfers both owners without allocation. Source: Entry left with empty name/value.

operator

pub fn operator =(Source: readonly Self&) -> void = delete;

Rejects implicit allocating assignment. Source: Existing owner. Return: No runtime result; this assignment is deleted and cannot be invoked.

operator

pub fn operator =(Source: mut Self&&) -> void

Replaces both owners by explicit transfer. Source: Entry left empty except unchanged self-move. Return: No value after transferring both encoded owners; nested self-move is unchanged.

pub Name: NativeStringView

pub Name: NativeStringView

Borrows exact name units without allocation. Return: View expiring on entry replacement/movement/destruction.

pub Value: NativeStringView

pub Value: NativeStringView

Borrows exact value units, including a present empty value. Return: View expiring on entry replacement/movement/destruction.

TryClone

pub readonly fn TryClone() -> Result<Self, NativeStringError>

Creates an independent name/value copy with explicit allocation failure. Return: Owned clone or exact native text/storage error; source unchanged. Warning: May allocate and copy all native units.

Documentation snapshot: October 24, 2026 About versions ↗
Searching Development · language & standard library