pub struct CommitReference {
pub sha: String,
pub url: String,
}Expand description
A minimal reference to a Git object containing only its SHA and API URL.
Used for parent commits, tree references, and related object links.
§Examples
let commit = client.get_commit("owner", "repo", "abc123").await?;
for parent in &commit.parents {
println!("Parent SHA: {}", parent.sha);
}Fields§
§sha: StringGit object SHA (40-character hexadecimal hash).
url: StringAPI URL for the referenced object.
Trait Implementations§
Source§impl Clone for CommitReference
impl Clone for CommitReference
Source§fn clone(&self) -> CommitReference
fn clone(&self) -> CommitReference
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommitReference
impl Debug for CommitReference
Source§impl<'de> Deserialize<'de> for CommitReference
impl<'de> Deserialize<'de> for CommitReference
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CommitReference
impl RefUnwindSafe for CommitReference
impl Send for CommitReference
impl Sync for CommitReference
impl Unpin for CommitReference
impl UnsafeUnpin for CommitReference
impl UnwindSafe for CommitReference
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