Struct git2::transport::Transport

source ·
pub struct Transport { /* private fields */ }
Expand description

A transport is a structure which knows how to transfer data to and from a remote.

This transport is a representation of the raw transport underneath it, which is similar to a trait object in Rust.

Implementations§

source§

impl Transport

source

pub fn smart<S>( remote: &Remote<'_>, rpc: bool, subtransport: S ) -> Result<Transport, Error>

Creates a new transport which will use the “smart” transport protocol for transferring data.

A smart transport requires a subtransport over which data is actually communicated, but this subtransport largely just needs to be able to read() and write(). The subtransport provided will be used to make connections which can then be read/written from.

The rpc argument is true if the protocol is stateless, false otherwise. For example http:// is stateless but git:// is not.

Trait Implementations§

source§

impl Drop for Transport

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.