Struct git_transport::client::file::SpawnProcessOnDemand[][src]

pub struct SpawnProcessOnDemand { /* fields omitted */ }

A utility to spawn a helper process to actually transmit data, possibly over ssh.

It can only be instantiated using the local connect() or ssh connect.

Trait Implementations

impl Drop for SpawnProcessOnDemand[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

impl Transport for SpawnProcessOnDemand[src]

fn handshake(
    &mut self,
    service: Service
) -> Result<SetServiceResponse<'_>, Error>
[src]

Initiate connection to the given service. Returns the service capabilities according according to the actual Protocol it supports, and possibly a list of refs to be obtained. This means that asking for an unsupported protocol will result in a protocol downgrade to the given one. using the read_line(…) function of the given BufReader. It must be exhausted, that is, read to the end before the next method can be invoked. Read more

fn request(
    &mut self,
    write_mode: WriteMode,
    on_into_read: MessageKind
) -> Result<RequestWriter<'_>, Error>
[src]

Get a writer for sending data and obtaining the response. It can be configured in various ways to support the task at hand. write_mode determines how calls to the write(…) method are interpreted, and on_into_read determines which message to write when the writer is turned into the response reader using into_read(). Read more

fn close(&mut self) -> Result<(), Error>[src]

Closes the connection to indicate no further requests will be made.

fn to_url(&self) -> String[src]

Returns the canonical URL pointing to the destination of this transport. Please note that local paths may not be represented correctly, as they will go through a potentially lossy unicode conversion. Read more

fn desired_protocol_version(&self) -> Protocol[src]

Returns the protocol version that was initially desired upon connection Please note that the actual protocol might differ after the handshake was conducted in case the server did not support it. Read more

fn is_stateful(&self) -> bool[src]

Returns true if the transport is inherently stateful, or false otherwise. Not being stateful implies that certain information has to be resent on each ‘turn’ of the fetch negotiation. Read more

fn set_identity(&mut self, _identity: Identity) -> Result<(), Error>[src]

If the handshake or subsequent reads failed with io::ErrorKind::PermissionDenied, use this method to inform the transport layer about the identity to use for subsequent calls. If authentication continues to fail even with an identity set, consider communicating this to the provider of the identity in order to mark it as invalid. Otherwise the user might have difficulty updating obsolete credentials. Please note that most transport layers are unauthenticated and thus return an error here. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> TransportV2Ext for T where
    T: Transport
[src]

pub fn invoke<'a>(
    &mut Self,
    &str,
    impl IntoIterator<Item = (&'a str, Option<&'a str>)>,
    Option<impl IntoIterator<Item = BString>>
) -> Result<Box<dyn ExtendedBufRead, Global>, Error>
[src]

Invoke a protocol V2 style command with given capabilities and optional command specific arguments. The capabilities were communicated during the handshake. Note: panics if handshake wasn’t performed beforehand. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.