#![cfg_attr(
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]
pub use bstr;
use bstr::{BStr, BString};
pub use gix_date as date;
use gix_date::Time;
mod identity;
#[allow(clippy::empty_docs)]
pub mod signature;
#[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Identity {
pub name: BString,
pub email: BString,
}
#[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct IdentityRef<'a> {
#[cfg_attr(feature = "serde", serde(borrow))]
pub name: &'a BStr,
pub email: &'a BStr,
}
#[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Signature {
pub name: BString,
pub email: BString,
pub time: Time,
}
#[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct SignatureRef<'a> {
#[cfg_attr(feature = "serde", serde(borrow))]
pub name: &'a BStr,
pub email: &'a BStr,
pub time: gix_date::Time,
}