Skip to main content

Crate gix_transport

Crate gix_transport 

Source
Expand description

An implementation of the git transport layer, abstracting over all of its versions.

Use client::blocking_io::connect() or client::async_io::connect() to establish a connection.

All git transports are supported, including ssh, git, http and https, as well as local repository paths.

§Feature Flags

  • blocking-client — If set, blocking implementations of the typical git transports become available in crate::client::blocking_io

  • http-client — Implies blocking-client, and adds support for the http and https transports.

  • http-client-curl — Implies http-client, and adds support for the http and https transports using the Rust bindings for libcurl.

    If used in conjunction with other blocking implementations like http-client-reqwest, this one takes precedence.

  • http-client-curl-rust-tls — Implies http-client-curl and enables rustls for creating https:// connections. If used in conjunction with http-client-curl-openssl, this feature will take precedence.

  • http-client-curl-openssl — Implies http-client-curl and enables ssl for creating https:// connections. If used in conjunction with http-client-curl-rust-tls, the rust-tls feature will take precedence.

  • http-client-reqwest — Implies http-client and adds support for http transports using the blocking version of reqwest. NOTE: https:// is NOT supported by default. You must enable one of the http-client-reqwest-rust-tls or http-client-reqwest-native-tls features to enable HTTPS support.

  • http-client-reqwest-rust-tls — Stacks with http-client-reqwest and enables https:// via the rustls crate.

  • http-client-reqwest-rust-tls-trust-dns — Stacks with http-client-reqwest and enables https:// via the rustls crate. This also makes use of trust-dns to avoid getaddrinfo, but note it comes with its own problems.

  • http-client-reqwest-native-tls — Stacks with http-client-reqwest and enables https:// via the native-tls crate.

  • http-client-insecure-credentials — Allows sending credentials over cleartext HTTP. For testing purposes only.

  • async-client — If set, an async implementations of the git transports becomes available in crate::client::async_io. Suitable for implementing your own transports while using git’s way of communication, typically in conjunction with a custom server. Note that the blocking client has a wide range of available transports, with the async version of it supporting only the TCP based git transport leaving you with the responsibility to providing such an implementation of futures-io::AsyncRead/AsyncWrite yourself.

§Other

  • serde — Data structures implement serde::Serialize and serde::Deserialize.
  • async-std — If used in conjunction with async-client, the connect() method will become available along with supporting the git protocol over TCP, where the TCP stream is created using this crate.

Re-exports§

pub use bstr;
pub use gix_packetline as packetline;

Modules§

client

Enums§

Protocol
The version of the way client and server communicate.
Service
The kind of service to invoke on the client or the server side.

Traits§

IsSpuriousError
An error which can tell whether it’s worth retrying to maybe succeed next time.