diff options
author | Katharina Fey <kookie@spacekookie.de> | 2020-01-07 17:04:27 +0000 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2020-01-10 01:05:19 +0000 |
commit | 500f25a2fe6e1f556665a2918e23bd6ebc3de17d (patch) | |
tree | b5ce7b6aec609a80168c469788b8c5a7ee5b6f66 /libgitmail/src/lib.rs | |
parent | fc7f7fc991b7dad7acf444b84929ab0c34df5ac6 (diff) |
Adding first outline of libgitmail
Diffstat (limited to 'libgitmail/src/lib.rs')
-rw-r--r-- | libgitmail/src/lib.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libgitmail/src/lib.rs b/libgitmail/src/lib.rs new file mode 100644 index 0000000..81de51d --- /dev/null +++ b/libgitmail/src/lib.rs @@ -0,0 +1,20 @@ +//! A library that can parse git-send-email generated email +//! +//! Please note that this is not a general mail parser. It is +//! specifically built to understand mail generated by git-send-email. +//! For a more general mail parser, maybe look at mailparse or mail +//! instead. +//! +//! The important fields to get from a git email are the "In-Reply-To" +//! and "References" header. The `structure` method returns the basic +//! structure of a pathset with a way to select specific parts of the +//! set to export. Look at the `PatchSet` type for more information. + +/// A mail error type +#[derive(Debug)] +pub enum Error { + /// Failed to parse the email for an unknown reason + FailedParsing, + /// The provided email is not a valid get-sent mail + NotAGitMail, +} |