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
 
impl Transport
Sourcepub fn smart<S>(
    remote: &Remote<'_>,
    rpc: bool,
    subtransport: S,
) -> Result<Transport, Error>where
    S: SmartSubtransport,
 
pub fn smart<S>(
    remote: &Remote<'_>,
    rpc: bool,
    subtransport: S,
) -> Result<Transport, Error>where
    S: SmartSubtransport,
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§
Auto Trait Implementations§
impl Freeze for Transport
impl RefUnwindSafe for Transport
impl !Send for Transport
impl !Sync for Transport
impl Unpin for Transport
impl UnwindSafe for Transport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more