pub struct StaticCredentialProvider { /* private fields */ }Expand description
StaticCredentialProvider loads credentials from a JSON string provided at construction time.
Implementations§
Source§impl StaticCredentialProvider
impl StaticCredentialProvider
Sourcepub fn new(content: impl Into<String>) -> Self
pub fn new(content: impl Into<String>) -> Self
Create a new StaticCredentialProvider from JSON content.
Sourcepub fn from_base64(content: impl Into<String>) -> Result<Self>
pub fn from_base64(content: impl Into<String>) -> Result<Self>
Create a new StaticCredentialProvider from base64-encoded JSON content.
Sourcepub fn with_scope(self, scope: impl Into<String>) -> Self
pub fn with_scope(self, scope: impl Into<String>) -> Self
Set the OAuth2 scope.
Trait Implementations§
Source§impl Clone for StaticCredentialProvider
impl Clone for StaticCredentialProvider
Source§fn clone(&self) -> StaticCredentialProvider
fn clone(&self) -> StaticCredentialProvider
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StaticCredentialProvider
impl Debug for StaticCredentialProvider
Source§impl ProvideCredential for StaticCredentialProvider
impl ProvideCredential for StaticCredentialProvider
Source§type Credential = Credential
type Credential = Credential
Credential returned by this loader. Read more
Auto Trait Implementations§
impl Freeze for StaticCredentialProvider
impl RefUnwindSafe for StaticCredentialProvider
impl Send for StaticCredentialProvider
impl Sync for StaticCredentialProvider
impl Unpin for StaticCredentialProvider
impl UnwindSafe for StaticCredentialProvider
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