pub struct Platform<'r> { /* private fields */ }
Expand description
A platform to create iterators over references.
Implementations
sourceimpl<'r> Platform<'r>
impl<'r> Platform<'r>
sourcepub fn all(&self) -> Result<Iter<'_>, Error>
pub fn all(&self) -> Result<Iter<'_>, Error>
Return an iterator over all references in the repository.
Even broken or otherwise unparsible or inaccessible references are returned and have to be handled by the caller on a case by case basis.
sourcepub fn prefixed(&self, prefix: impl AsRef<Path>) -> Result<Iter<'_>, Error>
pub fn prefixed(&self, prefix: impl AsRef<Path>) -> Result<Iter<'_>, Error>
Return an iterator over all references that match the given prefix
.
These are of the form refs/heads
or refs/remotes/origin
, and must not contain relative paths components like .
or ..
.
Return an iterator over all references that are tags.
They are all prefixed with refs/tags
.
sourcepub fn local_branches(&self) -> Result<Iter<'_>, Error>
pub fn local_branches(&self) -> Result<Iter<'_>, Error>
Return an iterator over all local branches.
They are all prefixed with refs/heads
.
sourcepub fn remote_branches(&self) -> Result<Iter<'_>, Error>
pub fn remote_branches(&self) -> Result<Iter<'_>, Error>
Return an iterator over all remote branches.
They are all prefixed with refs/remotes
.
Auto Trait Implementations
impl<'r> !RefUnwindSafe for Platform<'r>
impl<'r> !Send for Platform<'r>
impl<'r> !Sync for Platform<'r>
impl<'r> Unpin for Platform<'r>
impl<'r> !UnwindSafe for Platform<'r>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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