[−][src]Function wslapi::registry::distribution_names
pub fn distribution_names() -> impl Iterator<Item = OsString>
Get the DistributionName
s of all registered WSL distributions from
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\{...}\DistributionName
Example
let library = wslapi::Library::new(); for distro in wslapi::registry::distribution_names() { let library = library.as_ref().unwrap_or_else(|err| panic!( "WSL not available despite having WSL distributions: {}", err )); assert!( library.is_distribution_registered(&distro), "*not* registered: {}", distro.to_string_lossy() ); }