Skip to content

Commit 528f302

Browse files
committed
Complete documentation for distribution_id
1 parent 7b7ec3d commit 528f302

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

wslplugins-rs/src/distribution_id.rs

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,37 @@
1616
//! distribution identification via GUIDs or when a distinction between a system-level
1717
//! distribution and a user-specific distribution is necessary. The associated functions
1818
//! and conversions simplify integration with APIs like those defined in `WslPluginApi`.
19+
1920
use crate::CoreDistributionInformation;
2021
use std::{convert::TryFrom, fmt::Display};
2122
use thiserror::Error;
2223
use windows::core::GUID;
2324

24-
/// Represents a distribution identifier in WSL.
25+
/// Represents a distribution identifier in the Windows Subsystem for Linux (WSL).
26+
///
27+
/// A distribution can either be the system-level distribution or a user-specific distribution
28+
/// identified by a [GUID].
29+
///
30+
/// ## Variants
31+
///
32+
/// - `System`: Represents the system distribution, a central distribution used by WSL
33+
/// for managing low-level functionalities such as audio and graphical interaction.
34+
/// Refer to the [WSLg Architecture blogpost](https://devblogs.microsoft.com/commandline/wslg-architecture/#system-distro).
35+
///
36+
/// - `User(GUID)`: Represents an individual distribution installed by a user. Each distribution
37+
/// is uniquely identified by a [GUID], which is consistent across reboots. This GUID
38+
/// corresponds to the identifier used by WSL for managing the distribution.
39+
///
40+
/// ## Note
2541
///
26-
/// This can either be the system-level distribution or a user-specific distribution
27-
/// identified by a GUID.
42+
/// - The system distribution serves as a foundational component in WSL, often interacting with
43+
/// user distributions for operations like Linux GUI apps.
44+
/// - User distributions provide isolated environments for specific Linux distributions, allowing
45+
/// users to install and run various Linux distributions on their Windows machines.
2846
#[derive(Debug, Clone, Copy)]
2947
pub enum DistributionID {
3048
/// Represents the system-level distribution.
49+
/// For more info about the system distribution please check the [WSLg architecture blogpost](https://devblogs.microsoft.com/commandline/wslg-architecture/#system-distro)
3150
System,
3251
/// Represents an installed user-specific distribution identified by a [GUID].
3352
User(GUID),

0 commit comments

Comments
 (0)