docs: add missing docs

This commit is contained in:
daimond113 2024-08-03 22:50:09 +02:00
parent 431c2b634f
commit a24a440a84
No known key found for this signature in database
GPG key ID: 3A8ECE51328B513C

View file

@ -12,17 +12,23 @@ use crate::{
source::{pesde::PesdePackageSource, DependencySpecifiers, PackageRef, PackageSources}, source::{pesde::PesdePackageSource, DependencySpecifiers, PackageRef, PackageSources},
}; };
/// A pesde package reference
#[derive(Debug, Serialize, Deserialize, Clone, Eq, PartialEq)] #[derive(Debug, Serialize, Deserialize, Clone, Eq, PartialEq)]
pub struct PesdePackageRef { pub struct PesdePackageRef {
/// The name of the package
pub name: PackageName, pub name: PackageName,
/// The version of the package
pub version: Version, pub version: Version,
/// The index of the package
#[serde( #[serde(
serialize_with = "crate::util::serialize_gix_url", serialize_with = "crate::util::serialize_gix_url",
deserialize_with = "crate::util::deserialize_gix_url" deserialize_with = "crate::util::deserialize_gix_url"
)] )]
pub index_url: gix::Url, pub index_url: gix::Url,
/// The dependencies of the package
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub dependencies: BTreeMap<String, (DependencySpecifiers, DependencyType)>, pub dependencies: BTreeMap<String, (DependencySpecifiers, DependencyType)>,
/// The target of the package
pub target: Target, pub target: Target,
} }
impl PackageRef for PesdePackageRef { impl PackageRef for PesdePackageRef {