pub struct RemoteRef {
pub name: String,
pub oid: ObjectId,
pub symref_target: Option<String>,
}Expand description
A single reference returned by Remote::list_refs.
Fields§
§name: StringFull reference name (HEAD, refs/heads/main, refs/tags/v1^{}, …).
oid: ObjectIdObject id the ref resolves to.
symref_target: Option<String>Symbolic-ref target when ListRefsOptions::symrefs is set (HEAD only on v0/v1).
Implementations§
Source§impl RemoteRef
impl RemoteRef
Sourcepub fn peeled_tag(&self) -> Option<&str>
pub fn peeled_tag(&self) -> Option<&str>
For a peeled refs/tags/<tag>^{} line (ListRefsOptions::peel), the tag ref it
belongs to; None for every other ref.
Trait Implementations§
impl Eq for RemoteRef
impl StructuralPartialEq for RemoteRef
Auto Trait Implementations§
impl Freeze for RemoteRef
impl RefUnwindSafe for RemoteRef
impl Send for RemoteRef
impl Sync for RemoteRef
impl Unpin for RemoteRef
impl UnsafeUnpin for RemoteRef
impl UnwindSafe for RemoteRef
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