pub struct Dependency {
pub name: String,
pub status: DependencyStatus,
pub description: String,
pub required: bool,
pub install_hint: Option<String>,
}Expand description
Information about a system dependency.
Fields§
§name: StringName of the dependency (e.g., “cargo”, “node”).
status: DependencyStatusCurrent status of the dependency.
description: StringDescription of what this dependency is used for.
required: boolWhether this dependency is required or optional.
install_hint: Option<String>Installation instructions or hints.
Implementations§
Source§impl Dependency
impl Dependency
Sourcepub fn required(name: impl Into<String>, description: impl Into<String>) -> Self
pub fn required(name: impl Into<String>, description: impl Into<String>) -> Self
Create a new required dependency.
Sourcepub fn optional(name: impl Into<String>, description: impl Into<String>) -> Self
pub fn optional(name: impl Into<String>, description: impl Into<String>) -> Self
Create a new optional dependency.
Sourcepub fn with_status(self, status: DependencyStatus) -> Self
pub fn with_status(self, status: DependencyStatus) -> Self
Set the status of this dependency.
Trait Implementations§
Source§impl Clone for Dependency
impl Clone for Dependency
Source§fn clone(&self) -> Dependency
fn clone(&self) -> Dependency
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Dependency
impl RefUnwindSafe for Dependency
impl Send for Dependency
impl Sync for Dependency
impl Unpin for Dependency
impl UnwindSafe for Dependency
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