pub struct BitbucketAuthor {
pub name: String,
pub email_address: String,
pub display_name: String,
}
Expand description
The BitbucketAuthor
struct represents an author or committer of a commit returned by the Bitbucket API.
It contains information about the author, such as their name, email address, and display name.
This struct is usually used as a part of the BitbucketCommit
struct when working with 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 {
let author = &commit.author;
println!("Author name: {}", author.name);
println!("Author email: {}", author.email_address);
println!("Author display name: {}", author.display_name);
}
Fields§
§name: String
§email_address: String
§display_name: String
Trait Implementations§
Source§impl Debug for BitbucketAuthor
impl Debug for BitbucketAuthor
Source§impl<'de> Deserialize<'de> for BitbucketAuthor
impl<'de> Deserialize<'de> for BitbucketAuthor
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 BitbucketAuthor
impl Display for BitbucketAuthor
Source§impl Hash for BitbucketAuthor
impl Hash for BitbucketAuthor
Source§impl PartialEq for BitbucketAuthor
impl PartialEq for BitbucketAuthor
Source§impl Serialize for BitbucketAuthor
impl Serialize for BitbucketAuthor
impl Eq for BitbucketAuthor
impl StructuralPartialEq for BitbucketAuthor
Auto Trait Implementations§
impl Freeze for BitbucketAuthor
impl RefUnwindSafe for BitbucketAuthor
impl Send for BitbucketAuthor
impl Sync for BitbucketAuthor
impl Unpin for BitbucketAuthor
impl UnwindSafe for BitbucketAuthor
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.