silk.platform.windows.environment.
Delimiter rules for Windows UTF-16 environment entries.
When to use#
Use EnvironmentEntry.separator on one entry without its NUL terminator. Windows host-input
capture uses it to preserve hidden drive entries such as =C:=C:\work.
Import as EnvironmentEntry with import silk.platform.windows.environment { EnvironmentEntry }.
Public declarations: 1.
EnvironmentEntry#
pub struct EnvironmentEntryThe name and value boundary in a Windows environment entry.
Implementation EnvironmentEntry#
impl EnvironmentEntryAssociated function separator#
pub fn separator(units: &[u16]) -> Option<usize>Returns the first equals sign after index zero, or an absent option for a malformed entry.
Details#
The prefix is the name and the suffix is the value. A leading equals sign belongs to the name,
so =C:=C:\work has name =C:. Empty values are accepted; embedded NUL is rejected.
Category: Windows platform.
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, wasm32-wasip1, wasm32-wasip2, x86_64-pc-windows-msvc, wasm64-unknown-unknown.