-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
17 additions
and
9 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,14 +154,22 @@ pub enum License { | |
}, | ||
} | ||
|
||
/// Project people contact information | ||
/// A `project.authors` or `project.maintainers` entry. | ||
/// | ||
/// Specified in | ||
/// <https://packaging.python.org/en/latest/specifications/pyproject-toml/#authors-maintainers>. | ||
/// | ||
/// The entry is derived from the email format of `John Doe <[email protected]>`. You need to | ||
/// provide at least name or email. | ||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] | ||
#[serde(expecting = "a table with 'name' and 'email' keys")] | ||
pub struct Contact { | ||
/// A valid email name | ||
pub name: Option<String>, | ||
/// A valid email address | ||
pub email: Option<String>, | ||
#[serde(untagged, expecting = "a table with 'name' and/or 'email' keys")] | ||
pub enum Contact { | ||
/// TODO(konsti): RFC 822 validation. | ||
Name { name: String }, | ||
/// TODO(konsti): RFC 822 validation. | ||
Email { email: String }, | ||
/// TODO(konsti): RFC 822 validation. | ||
NameEmail { name: String, email: String }, | ||
} | ||
|
||
/// The `[dependency-groups]` section of pyproject.toml, as specified in PEP 735 | ||
|