pub struct Ref { /* private fields */ }Expand description
The contents of a git ref
Implementations§
Source§impl Ref
impl Ref
Sourcepub async fn resolve_object_id<F: FileSystem>(
&self,
repo: &Repo<F>,
) -> GResult<ObjectId>
pub async fn resolve_object_id<F: FileSystem>( &self, repo: &Repo<F>, ) -> GResult<ObjectId>
Follow a chain of refs until a direct ref is obtained, and return the object ID that it points to.
Sourcepub async fn peel_to_commit<F: FileSystem>(
&self,
repo: &Repo<F>,
) -> GResult<Option<Commit>>
pub async fn peel_to_commit<F: FileSystem>( &self, repo: &Repo<F>, ) -> GResult<Option<Commit>>
Peel the ref to a commit object.
Returns None if the ref does not point to a commit object.
Sourcepub async fn peel_to_tree<F: FileSystem>(
&self,
repo: &Repo<F>,
) -> GResult<Option<Tree>>
pub async fn peel_to_tree<F: FileSystem>( &self, repo: &Repo<F>, ) -> GResult<Option<Tree>>
Peel the ref to a tree object.
Returns None if the ref does not point to a commit or a tree object.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ref
impl RefUnwindSafe for Ref
impl Send for Ref
impl Sync for Ref
impl Unpin for Ref
impl UnsafeUnpin for Ref
impl UnwindSafe for Ref
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