pub struct BitbucketPullRequestAuthor {
pub user: BitbucketAuthor,
pub approved: bool,
}
Expand description
The BitbucketPullRequestAuthor
struct represents the author of a pull request returned by the Bitbucket API.
It contains information about the author, such as the user and whether the pull request has been approved by the author.
This struct is usually used as part of the BitbucketPullRequest
struct when working with the BitbucketClient
to fetch pull requests associated with a commit.
§Example
Suppose you want to fetch all pull requests associated with a commit hash using the BitbucketClient::get_pull_requests()
method.
You’ll receive a BitbucketPaginated<BitbucketPullRequest>
iterator, which you can use to fetch all pages of pull requests:
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 commit_hash = "abcdef";
let mut pr_iter = client.get_pull_requests(project_key, repo_slug, commit_hash);
let all_pull_requests = pr_iter.all().await.unwrap();
for pr in all_pull_requests {
println!("Author display name: {}", pr.author.user.display_name);
println!("Author email: {}", pr.author.user.email_address);
println!("Author approval status: {}", pr.author.approved);
}
Fields§
§user: BitbucketAuthor
§approved: bool
Trait Implementations§
Source§impl Debug for BitbucketPullRequestAuthor
impl Debug for BitbucketPullRequestAuthor
Source§impl<'de> Deserialize<'de> for BitbucketPullRequestAuthor
impl<'de> Deserialize<'de> for BitbucketPullRequestAuthor
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 BitbucketPullRequestAuthor
impl Display for BitbucketPullRequestAuthor
Source§impl Hash for BitbucketPullRequestAuthor
impl Hash for BitbucketPullRequestAuthor
Source§impl PartialEq for BitbucketPullRequestAuthor
impl PartialEq for BitbucketPullRequestAuthor
Source§fn eq(&self, other: &BitbucketPullRequestAuthor) -> bool
fn eq(&self, other: &BitbucketPullRequestAuthor) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl Eq for BitbucketPullRequestAuthor
impl StructuralPartialEq for BitbucketPullRequestAuthor
Auto Trait Implementations§
impl Freeze for BitbucketPullRequestAuthor
impl RefUnwindSafe for BitbucketPullRequestAuthor
impl Send for BitbucketPullRequestAuthor
impl Sync for BitbucketPullRequestAuthor
impl Unpin for BitbucketPullRequestAuthor
impl UnwindSafe for BitbucketPullRequestAuthor
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.