silk.platform.windows.host_input.
Windows HostInput with owned arguments and an environment snapshot in raw canonical WTF-8.
When to use#
The Windows entry point supplies WindowsHostInput to application effects that require HostInput.
Use WindowsHostInput.capture in a custom Windows runtime.
Import as WindowsHostInput with import silk.platform.windows.host_input { WindowsHostInput }.
Public declarations: 1.
WindowsHostInput#
pub struct WindowsHostInputOwned Windows arguments and environment entries, with case-insensitive environment lookup.
Details#
Arguments and environment values are canonical WTF-8 bytes; lone surrogates survive.
The snapshot does not change. Lookup uses Windows CompareStringOrdinal with case ignored,
and returns the first matching entry. Hidden names such as =C: are retained.
Working-directory queries return the current native Windows path as WTF-8, not a Path spelling.
Implementation WindowsHostInput#
impl WindowsHostInputAssociated function capture#
pub effect fn capture() -> WindowsHostInput ! HostInputError | OutOfMemoryError ? &mut AllocatorCaptures the process command line and environment, releasing the OS environment block after copying.
Details#
MSVC parsing preserves argument zero's special quoting rules. An empty command line gives one empty argument. Malformed environment entries without a name/value separator are ignored.
Errors#
HostInputErrorif Windows cannot supply the command line or environment.OutOfMemoryErrorif the owned snapshot cannot be allocated. Partial copies are released.
Implementation HostInput for WindowsHostInput#
impl HostInput for WindowsHostInputOperation argumentCount#
argumentCount: WindowsHostInput.argumentCountOperation argument#
argument: WindowsHostInput.argumentOperation variable#
variable: WindowsHostInput.variableOperation workingDirectory#
workingDirectory: WindowsHostInput.workingDirectoryCategory: Windows platform.
Profiles: x86_64-pc-windows-msvc.