gix_protocol::fetch

Struct Context

Source
pub struct Context<'a, T> {
    pub handshake: &'a mut Outcome,
    pub transport: &'a mut T,
    pub user_agent: (&'static str, Option<Cow<'static, str>>),
    pub trace_packetlines: bool,
}
Available on crate feature handshake only.
Expand description

For use in RefMap::new() and fetch.

Fields§

§handshake: &'a mut Outcome

The outcome of the handshake performed with the remote.

Note that it’s mutable as depending on the protocol, it may contain refs that have been sent unconditionally.

§transport: &'a mut T

The transport to use when making an ls-refs or fetch call.

This is always done if the underlying protocol is V2, which is implied by the absence of refs in the handshake outcome.

§user_agent: (&'static str, Option<Cow<'static, str>>)

How to self-identify during the ls-refs call in RefMap::new() or the fetch call in fetch().

This could be read from the gitoxide.userAgent configuration variable.

§trace_packetlines: bool

If true, output all packetlines using the the gix-trace machinery.

Auto Trait Implementations§

§

impl<'a, T> Freeze for Context<'a, T>

§

impl<'a, T> RefUnwindSafe for Context<'a, T>
where T: RefUnwindSafe,

§

impl<'a, T> Send for Context<'a, T>
where T: Send,

§

impl<'a, T> Sync for Context<'a, T>
where T: Sync,

§

impl<'a, T> Unpin for Context<'a, T>

§

impl<'a, T> !UnwindSafe for Context<'a, T>

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>,

Source§

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>,

Source§

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.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T