Skip to content

Commit

Permalink
docs: add a few docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
fosskers committed Nov 27, 2023
1 parent c36fdec commit 4da661c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
//! Independently testable types and functions.
use serde::Deserialize;
use std::{
ops::Not,
path::{Path, PathBuf},
};
use std::ops::Not;
use std::path::{Path, PathBuf};

/// The git forge in which a project's source code is stored.
pub enum GitHost {
Github,
Gitlab,
Expand All @@ -26,6 +25,7 @@ impl GitHost {
}
}

/// The critical fields read from a `Cargo.toml` and rewritten into a PKGBUILD.
#[derive(Deserialize, Debug)]
pub struct Package {
pub name: String,
Expand Down Expand Up @@ -68,6 +68,7 @@ impl Package {
// }.tarball(Path::new("foobar"))
// }

/// The `[package.metadata]` TOML block.
#[derive(Deserialize, Debug)]
pub struct Metadata {
/// Deprecated.
Expand Down Expand Up @@ -132,6 +133,7 @@ impl std::fmt::Display for Metadata {
}
}

/// The inner values of a `[package.metadata.aur]` TOML block.
#[derive(Deserialize, Debug)]
pub struct AUR {
#[serde(default)]
Expand Down

0 comments on commit 4da661c

Please sign in to comment.