Trait git2::transport::SmartSubtransport [−][src]
pub trait SmartSubtransport: Send + 'static {
fn action(
&self,
url: &str,
action: Service
) -> Result<Box<dyn SmartSubtransportStream>, Error>;
fn close(&self) -> Result<(), Error>;
}
Expand description
Interface used by smart transports.
The full-fledged definiton of transports has to deal with lots of nitty-gritty details of the git protocol, but “smart transports” largely only need to deal with read() and write() of data over a channel.
A smart subtransport is contained within an instance of a smart transport and is delegated to in order to actually conduct network activity to push or pull data from a remote.
Required methods
Indicates that this subtransport will be performing the specified action on the specified URL.
This function is responsible for making any network connections and returns a stream which can be read and written from in order to negotiate the git protocol.