pub struct InstalledDistribution { /* private fields */ }Expand description
One row of wsl --list --verbose.
Implementations§
Source§impl InstalledDistribution
impl InstalledDistribution
Sourcepub fn state(&self) -> &str
pub fn state(&self) -> &str
The state word WSL printed, verbatim.
Localised. Running and Stopped are English; a Windows in
another display language prints its own words. Nothing in this adapter
branches on it — running a command starts a stopped distribution
anyway — so it is carried for display and for nothing else.
Sourcepub fn wsl_version(&self) -> u8
pub fn wsl_version(&self) -> u8
1 or 2. A larger number from a future WSL is carried, not clamped.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Whether WSL marked this row with *.
Sourcepub fn is_wsl2(&self) -> bool
pub fn is_wsl2(&self) -> bool
Whether this is a WSL2 distribution, which is the only kind supported.
Sourcepub fn require_wsl2(&self) -> Result<(), WslError>
pub fn require_wsl2(&self) -> Result<(), WslError>
Trait Implementations§
Source§impl Clone for InstalledDistribution
impl Clone for InstalledDistribution
Source§fn clone(&self) -> InstalledDistribution
fn clone(&self) -> InstalledDistribution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InstalledDistribution
impl Debug for InstalledDistribution
impl Eq for InstalledDistribution
Source§impl PartialEq for InstalledDistribution
impl PartialEq for InstalledDistribution
impl StructuralPartialEq for InstalledDistribution
Auto Trait Implementations§
impl Freeze for InstalledDistribution
impl RefUnwindSafe for InstalledDistribution
impl Send for InstalledDistribution
impl Sync for InstalledDistribution
impl Unpin for InstalledDistribution
impl UnsafeUnpin for InstalledDistribution
impl UnwindSafe for InstalledDistribution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more