#![cfg_attr(
feature = "document-features",
cfg_attr(doc, doc = ::document_features::document_features!())
)]
#![forbid(unsafe_code)]
#![deny(rust_2018_idioms, missing_docs)]
pub use git_packetline as packetline;
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
#[allow(missing_docs)]
pub enum Protocol {
V1 = 1,
V2 = 2,
}
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
pub enum Service {
UploadPack,
ReceivePack,
}
impl Service {
pub fn as_str(&self) -> &'static str {
match self {
Service::ReceivePack => "git-receive-pack",
Service::UploadPack => "git-upload-pack",
}
}
}
pub mod client;
#[doc(inline)]
#[cfg(feature = "blocking-client")]
pub use client::connect;
#[cfg(all(feature = "async-client", feature = "blocking-client"))]
compile_error!("Cannot set both 'blocking-client' and 'async-client' features as they are mutually exclusive");