pub struct PathDependency {
pub name: String,
pub path: PathBuf,
pub editable: bool,
pub extras: Vec<String>,
}Expand description
A local path dependency
Fields§
§name: StringPackage name
path: PathBufPath to the package (relative to project root or absolute)
editable: boolWhether to install as editable (default: true)
extras: Vec<String>Optional extras to install
Implementations§
Source§impl PathDependency
impl PathDependency
Sourcepub fn new(name: impl Into<String>, path: impl Into<PathBuf>) -> Self
pub fn new(name: impl Into<String>, path: impl Into<PathBuf>) -> Self
Create a new path dependency
Sourcepub fn with_editable(self, editable: bool) -> Self
pub fn with_editable(self, editable: bool) -> Self
Set editable mode
Sourcepub fn with_extras(self, extras: Vec<String>) -> Self
pub fn with_extras(self, extras: Vec<String>) -> Self
Add extras
Sourcepub fn resolve_path(&self, base_dir: &Path) -> PathBuf
pub fn resolve_path(&self, base_dir: &Path) -> PathBuf
Resolve the path relative to a base directory
Sourcepub fn validate(&self, base_dir: &Path) -> Result<()>
pub fn validate(&self, base_dir: &Path) -> Result<()>
Check if the path dependency is valid (path exists and has pyproject.toml)
Trait Implementations§
Source§impl Clone for PathDependency
impl Clone for PathDependency
Source§fn clone(&self) -> PathDependency
fn clone(&self) -> PathDependency
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 moreSource§impl Debug for PathDependency
impl Debug for PathDependency
Source§impl<'de> Deserialize<'de> for PathDependency
impl<'de> Deserialize<'de> for PathDependency
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PathDependency
impl RefUnwindSafe for PathDependency
impl Send for PathDependency
impl Sync for PathDependency
impl Unpin for PathDependency
impl UnwindSafe for PathDependency
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