pub struct LifecycleTaskIdentity { /* private fields */ }Expand description
The stable, per-distribution name of the product’s lifecycle task.
Implementations§
Source§impl LifecycleTaskIdentity
impl LifecycleTaskIdentity
Sourcepub fn for_distribution(distribution: &str) -> Result<Self, WslError>
pub fn for_distribution(distribution: &str) -> Result<Self, WslError>
Derives the task identity for a distribution.
§The name is escaped and hashed, and both halves are load-bearing
See [escaped_name_with_digest], which is also what
super::record names its files with: escaping alone would map
Debian GNU/Linux and Debian GNU:Linux onto one task, which is two
distributions quietly sharing one keep-alive.
§Errors
WslError::InvalidName for a name that cannot be used at all.
Sourcepub fn distribution(&self) -> &str
pub fn distribution(&self) -> &str
The distribution this task keeps alive.
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
The description the document carries, which also carries the marker.
Trait Implementations§
Source§impl Clone for LifecycleTaskIdentity
impl Clone for LifecycleTaskIdentity
Source§fn clone(&self) -> LifecycleTaskIdentity
fn clone(&self) -> LifecycleTaskIdentity
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 LifecycleTaskIdentity
impl Debug for LifecycleTaskIdentity
impl Eq for LifecycleTaskIdentity
Source§impl PartialEq for LifecycleTaskIdentity
impl PartialEq for LifecycleTaskIdentity
impl StructuralPartialEq for LifecycleTaskIdentity
Auto Trait Implementations§
impl Freeze for LifecycleTaskIdentity
impl RefUnwindSafe for LifecycleTaskIdentity
impl Send for LifecycleTaskIdentity
impl Sync for LifecycleTaskIdentity
impl Unpin for LifecycleTaskIdentity
impl UnsafeUnpin for LifecycleTaskIdentity
impl UnwindSafe for LifecycleTaskIdentity
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