Library guide · API index and notation
This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.
import "std/env/windows"
This is a provider or implementation package. Start with the linked guide’s application API; native declarations depend on the selected target.
Names used in signatures
Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.
| Alias | Package | Source file |
|---|---|---|
error |
std/platform/error |
windows.dodo |
native |
std/platform/native |
windows.dodo |
ptr |
core/ptr |
windows.dodo |
Snapshot
Struct · Source
Immutable, caller-backed copy: mutation of the process environment cannot invalidate or change this snapshot. No allocation or global pointer escapes.
pub struct Snapshot {
// Private implementation fields omitted.
}
Snapshot.entries
Function · Source
pub fn entries(&self) -> &native.NativeList
Snapshot.len
Function · Source
pub fn len(&self) -> usize
Snapshot.at
Function · Source
pub fn at(&self, index: usize) -> Option<native.NativeString>
Snapshot.get
Function · Source
pub fn get(&self, name: &native.NativeString) -> Option<native.NativeString> from(self)
capture
Function · Source
pub fn capture(bytes: &mut[u8], wide: &mut[u16]) -> Snapshot!error.Error from(bytes, wide)
arguments
Function · Source
pub fn arguments(bytes: &mut[u8], wide: &mut[u16]) -> Snapshot!error.Error from(bytes, wide)
current_dir
Function · Source
pub fn current_dir(bytes: &mut[u8], wide: &mut[u16]) -> native.NativeString!error.Error from(bytes, wide)
Builder
Struct · Source
Explicit child environment; never changes the parent. set replaces a key atomically with respect to capacity failure. Windows compares names with the OS’s ordinal case-insensitive comparison; Unix compares native bytes.
pub struct Builder {
// Private implementation fields omitted.
}
Builder.new
Function · Source
pub fn new(bytes: &mut[u8], wide: &mut[u16]) -> Builder from(bytes, wide)
Builder.clear
Function · Source
pub fn clear(&mut self)
Builder.copy_from
Function · Source
pub fn copy_from(&mut self, source: &Snapshot) -> void!error.Error
Builder.set
Function · Source
pub fn set(&mut self, name: &native.NativeString, value: &native.NativeString) -> void!error.Error
Builder.remove
Function · Source
pub fn remove(&mut self, name: &native.NativeString) -> bool
Builder.snapshot
Function · Source
pub fn snapshot(&self) -> Snapshot!error.Error
lookup
Function · Source
pub fn lookup(name: &native.NativeString, storage: &mut native.Workspace) -> bool!error.Error
arguments_into
Function · Source
pub fn arguments_into(storage: &mut native.ListWorkspace) -> void!error.Error
view
Function · Source
pub fn view(values: native.NativeList) -> Snapshot