Enum azure_devops_rust_api::Credential
source · [−]pub enum Credential {
Unauthenticated,
Pat(String),
TokenCredential(Arc<dyn TokenCredential>),
}Expand description
A credential for authenticating with Azure DevOps.
Supports:
- Azure DevOps Personal Access Token (PAT).
- OAuth token credential obtained via the
azure_identitycrate.
Variants
Unauthenticated
Pat(String)
TokenCredential(Arc<dyn TokenCredential>)
Implementations
sourceimpl Credential
impl Credential
sourcepub fn unauthenticated() -> Self
pub fn unauthenticated() -> Self
Creates a new Credential for unauthenticated operations.
sourcepub fn from_pat(pat: impl Into<String>) -> Self
pub fn from_pat(pat: impl Into<String>) -> Self
Creates a new Credential using the supplied PAT token.
sourcepub fn from_token_credential<T>(token_credential: Arc<T>) -> Selfwhere
T: TokenCredential + 'static,
pub fn from_token_credential<T>(token_credential: Arc<T>) -> Selfwhere
T: TokenCredential + 'static,
Creates a new Credential using the supplied object that implements TokenCredential.
Note that the supplied object must be wrapped in an Arc<...>.
Trait Implementations
sourceimpl Clone for Credential
impl Clone for Credential
sourcefn clone(&self) -> Credential
fn clone(&self) -> Credential
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations
impl !RefUnwindSafe for Credential
impl Send for Credential
impl Sync for Credential
impl Unpin for Credential
impl !UnwindSafe for Credential
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more