pesde/src/source/path/specifier.rs
2024-12-30 18:33:48 +01:00

17 lines
552 B
Rust

use crate::source::DependencySpecifier;
use serde::{Deserialize, Serialize};
use std::{fmt::Display, path::PathBuf};
/// The specifier for a path dependency
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Hash)]
pub struct PathDependencySpecifier {
/// The path to the package
pub path: PathBuf,
}
impl DependencySpecifier for PathDependencySpecifier {}
impl Display for PathDependencySpecifier {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "path:{}", self.path.display())
}
}