pub struct AzureDevOpsBuilder { /* private fields */ }Expand description
Builder for constructing an AzureDevOps client.
§Example
use azure_devops::AzureDevOpsBuilder;
let client = AzureDevOpsBuilder::new()
.organization("my-company")
.pat("my-pat-token")
.build()
.unwrap();Implementations§
Source§impl AzureDevOpsBuilder
impl AzureDevOpsBuilder
Sourcepub fn organization(self, org: impl Into<String>) -> Self
pub fn organization(self, org: impl Into<String>) -> Self
Set the Azure DevOps organization name.
This is the subdomain portion of your Azure DevOps URL.
For https://dev.azure.com/my-company, the organization is my-company.
Sourcepub fn pat(self, token: impl Into<String>) -> Self
pub fn pat(self, token: impl Into<String>) -> Self
Set a Personal Access Token for authentication.
Sourcepub fn api_version(self, version: impl Into<String>) -> Self
pub fn api_version(self, version: impl Into<String>) -> Self
Override the default API version.
The default is "7.1". You might set this to a preview version
like "7.2-preview.1" if you need preview features.
Sourcepub fn build(self) -> Result<AzureDevOps>
pub fn build(self) -> Result<AzureDevOps>
Build the AzureDevOps client.
§Errors
Returns AzureDevOpsError::Config if the organization is not set.
Trait Implementations§
Source§impl Debug for AzureDevOpsBuilder
impl Debug for AzureDevOpsBuilder
Auto Trait Implementations§
impl Freeze for AzureDevOpsBuilder
impl RefUnwindSafe for AzureDevOpsBuilder
impl Send for AzureDevOpsBuilder
impl Sync for AzureDevOpsBuilder
impl Unpin for AzureDevOpsBuilder
impl UnsafeUnpin for AzureDevOpsBuilder
impl UnwindSafe for AzureDevOpsBuilder
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