pub struct BitbucketPullRequest {
pub id: u64,
pub title: String,
pub description: String,
pub open: bool,
pub author: BitbucketPullRequestAuthor,
pub created_date: DateTime<Local>,
pub updated_date: DateTime<Local>,
}
Expand description
The BitbucketPullRequest
struct represents a pull request returned by the Bitbucket API.
It contains information about the pull request, such as the ID, title, description, open status, author, and creation and update dates.
This struct is usually used 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!("Pull request ID: {}", pr.id);
println!("Title: {}", pr.title);
println!("Description: {}", pr.description);
println!("Open: {}", pr.open);
println!("Created: {}", pr.created_date);
println!("Updated: {}", pr.updated_date);
}
Fields§
§id: u64
§title: String
§description: String
§open: bool
§created_date: DateTime<Local>
§updated_date: DateTime<Local>
Trait Implementations§
Source§impl Debug for BitbucketPullRequest
impl Debug for BitbucketPullRequest
Source§impl<'de> Deserialize<'de> for BitbucketPullRequest
impl<'de> Deserialize<'de> for BitbucketPullRequest
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 BitbucketPullRequest
impl Display for BitbucketPullRequest
Source§impl Hash for BitbucketPullRequest
impl Hash for BitbucketPullRequest
Source§impl PartialEq for BitbucketPullRequest
impl PartialEq for BitbucketPullRequest
Source§impl Serialize for BitbucketPullRequest
impl Serialize for BitbucketPullRequest
impl Eq for BitbucketPullRequest
impl StructuralPartialEq for BitbucketPullRequest
Auto Trait Implementations§
impl Freeze for BitbucketPullRequest
impl RefUnwindSafe for BitbucketPullRequest
impl Send for BitbucketPullRequest
impl Sync for BitbucketPullRequest
impl Unpin for BitbucketPullRequest
impl UnwindSafe for BitbucketPullRequest
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.