pub struct BitbucketClient { /* private fields */ }Expand description
Bitbucket Server API client
Implementations§
Source§impl BitbucketClient
impl BitbucketClient
Sourcepub fn new(config: &BitbucketConfig) -> Result<Self>
pub fn new(config: &BitbucketConfig) -> Result<Self>
Create a new Bitbucket client
Sourcepub async fn get<T>(&self, path: &str) -> Result<T>where
T: for<'de> Deserialize<'de>,
pub async fn get<T>(&self, path: &str) -> Result<T>where
T: for<'de> Deserialize<'de>,
Make a GET request to the Bitbucket API
Sourcepub async fn post<T, U>(&self, path: &str, body: &T) -> Result<U>where
T: Serialize,
U: for<'de> Deserialize<'de>,
pub async fn post<T, U>(&self, path: &str, body: &T) -> Result<U>where
T: Serialize,
U: for<'de> Deserialize<'de>,
Make a POST request to the Bitbucket API
Sourcepub async fn put<T, U>(&self, path: &str, body: &T) -> Result<U>where
T: Serialize,
U: for<'de> Deserialize<'de>,
pub async fn put<T, U>(&self, path: &str, body: &T) -> Result<U>where
T: Serialize,
U: for<'de> Deserialize<'de>,
Make a PUT request to the Bitbucket API
Sourcepub async fn get_build_statuses<T>(&self, commit_hash: &str) -> Result<T>where
T: for<'de> Deserialize<'de>,
pub async fn get_build_statuses<T>(&self, commit_hash: &str) -> Result<T>where
T: for<'de> Deserialize<'de>,
Fetch build statuses via the build-status API (base path differs from core REST API)
Sourcepub async fn delete(&self, path: &str) -> Result<()>
pub async fn delete(&self, path: &str) -> Result<()>
Make a DELETE request to the Bitbucket API
Sourcepub async fn test_connection(&self) -> Result<()>
pub async fn test_connection(&self) -> Result<()>
Test the connection to Bitbucket Server
Sourcepub async fn get_repository_info(&self) -> Result<RepositoryInfo>
pub async fn get_repository_info(&self) -> Result<RepositoryInfo>
Get repository information
Auto Trait Implementations§
impl Freeze for BitbucketClient
impl !RefUnwindSafe for BitbucketClient
impl Send for BitbucketClient
impl Sync for BitbucketClient
impl Unpin for BitbucketClient
impl !UnwindSafe for BitbucketClient
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more