|
16 | 16 | //! distribution identification via GUIDs or when a distinction between a system-level |
17 | 17 | //! distribution and a user-specific distribution is necessary. The associated functions |
18 | 18 | //! and conversions simplify integration with APIs like those defined in `WslPluginApi`. |
| 19 | +
|
19 | 20 | use crate::CoreDistributionInformation; |
20 | 21 | use std::{convert::TryFrom, fmt::Display}; |
21 | 22 | use thiserror::Error; |
22 | 23 | use windows::core::GUID; |
23 | 24 |
|
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 |
25 | 41 | /// |
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. |
28 | 46 | #[derive(Debug, Clone, Copy)] |
29 | 47 | pub enum DistributionID { |
30 | 48 | /// 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) |
31 | 50 | System, |
32 | 51 | /// Represents an installed user-specific distribution identified by a [GUID]. |
33 | 52 | User(GUID), |
|
0 commit comments