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