pub struct BitbucketCommit {
pub id: String,
pub display_id: String,
pub author: BitbucketAuthor,
pub committer: BitbucketAuthor,
pub message: String,
}
Expand description
The BitbucketCommit
struct represents a single commit returned by the Bitbucket API.
It contains information about the commit, such as its ID, display ID, author, committer, and message.
This struct is usually used as a result of API calls made through the BitbucketClient
.
§Example
Suppose you want to fetch all commits between two commit hashes using the BitbucketClient::compare_commits()
method.
You’ll receive a BitbucketPaginated<BitbucketCommit>
iterator, which you can use to fetch all pages of commits:
use deployment_changelog::api::bitbucket::{BitbucketClient, BitbucketPaginated};
use deployment_changelog::api::rest::Paginated;
// Suppose you have a BitbucketClient named 'client'
let project_key = "PROJECT";
let repo_slug = "my-repo";
let start_commit = "abcdef";
let end_commit = "123456";
let mut commits_iter = client.compare_commits(project_key, repo_slug, start_commit, end_commit);
let all_commits = commits_iter.all().await.unwrap();
for commit in all_commits {
println!("Commit ID: {}", commit.id);
println!("Author: {}", commit.author.display_name);
println!("Message: {}", commit.message);
}
Fields§
§id: String
§display_id: String
§committer: BitbucketAuthor
§message: String
Trait Implementations§
Source§impl Debug for BitbucketCommit
impl Debug for BitbucketCommit
Source§impl<'de> Deserialize<'de> for BitbucketCommit
impl<'de> Deserialize<'de> for BitbucketCommit
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
Source§impl Display for BitbucketCommit
impl Display for BitbucketCommit
Source§impl Hash for BitbucketCommit
impl Hash for BitbucketCommit
Source§impl PartialEq for BitbucketCommit
impl PartialEq for BitbucketCommit
Source§impl Serialize for BitbucketCommit
impl Serialize for BitbucketCommit
impl Eq for BitbucketCommit
impl StructuralPartialEq for BitbucketCommit
Auto Trait Implementations§
impl Freeze for BitbucketCommit
impl RefUnwindSafe for BitbucketCommit
impl Send for BitbucketCommit
impl Sync for BitbucketCommit
impl Unpin for BitbucketCommit
impl UnwindSafe for BitbucketCommit
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.