Struct git_repository::remote::Connection
source · [−]pub struct Connection<'a, 'repo, T, P> { /* private fields */ }
Expand description
A type to represent an ongoing connection to a remote host, typically with the connection already established.
It can be used to perform a variety of operations with the remote without worrying about protocol details, much like a remote procedure call.
Implementations
sourceimpl<'a, 'repo, T, P> Connection<'a, 'repo, T, P>
impl<'a, 'repo, T, P> Connection<'a, 'repo, T, P>
Access
sourceimpl<'a, 'repo, T, P> Connection<'a, 'repo, T, P> where
T: Transport,
P: Progress,
impl<'a, 'repo, T, P> Connection<'a, 'repo, T, P> where
T: Transport,
P: Progress,
sourcepub fn list_refs(self) -> Result<Vec<Ref>, Error>
Available on crate features async-network-client
or blocking-network-client
only.
pub fn list_refs(self) -> Result<Vec<Ref>, Error>
async-network-client
or blocking-network-client
only.List all references on the remote.
Note that this doesn’t fetch the objects mentioned in the tips nor does it make any change to underlying repository.
sourcepub fn list_refs_by_refspec(&mut self, _direction: Direction) -> !
Available on crate features async-network-client
or blocking-network-client
only.
pub fn list_refs_by_refspec(&mut self, _direction: Direction) -> !
async-network-client
or blocking-network-client
only.List all references on the remote that have been filtered through our remote’s refspecs
for fetching or pushing depending on direction
.
This comes in the form of information of all matching tips on the remote and the object they point to, along with with the local tracking branch of these tips (if available).
Note that this doesn’t fetch the objects mentioned in the tips nor does it make any change to underlying repository.
Auto Trait Implementations
impl<'a, 'repo, T, P> !RefUnwindSafe for Connection<'a, 'repo, T, P>
impl<'a, 'repo, T, P> !Send for Connection<'a, 'repo, T, P>
impl<'a, 'repo, T, P> !Sync for Connection<'a, 'repo, T, P>
impl<'a, 'repo, T, P> Unpin for Connection<'a, 'repo, T, P> where
P: Unpin,
T: Unpin,
'repo: 'a,
impl<'a, 'repo, T, P> !UnwindSafe for Connection<'a, 'repo, T, P>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more