pub struct RemoteConnection<'repo, 'connection, 'cb> { /* private fields */ }
Expand description
Holds callbacks for a connection to a Remote
. Disconnects when dropped
Implementations§
Source§impl<'repo, 'connection, 'cb> RemoteConnection<'repo, 'connection, 'cb>
impl<'repo, 'connection, 'cb> RemoteConnection<'repo, 'connection, 'cb>
Sourcepub fn list(&self) -> Result<&[RemoteHead<'_>], Error>
pub fn list(&self) -> Result<&[RemoteHead<'_>], Error>
Get the remote repository’s reference advertisement list.
This list is available as soon as the connection to the remote is initiated and it remains available after disconnecting.
Sourcepub fn default_branch(&self) -> Result<Buf, Error>
pub fn default_branch(&self) -> Result<Buf, Error>
Get the remote’s default branch.
This default branch is available as soon as the connection to the remote is initiated and it remains available after disconnecting.
Trait Implementations§
Auto Trait Implementations§
impl<'repo, 'connection, 'cb> Freeze for RemoteConnection<'repo, 'connection, 'cb>
impl<'repo, 'connection, 'cb> !RefUnwindSafe for RemoteConnection<'repo, 'connection, 'cb>
impl<'repo, 'connection, 'cb> !Send for RemoteConnection<'repo, 'connection, 'cb>
impl<'repo, 'connection, 'cb> !Sync for RemoteConnection<'repo, 'connection, 'cb>
impl<'repo, 'connection, 'cb> Unpin for RemoteConnection<'repo, 'connection, 'cb>
impl<'repo, 'connection, 'cb> !UnwindSafe for RemoteConnection<'repo, 'connection, 'cb>
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