pub struct DefaultCredentialProviderBuilder { /* private fields */ }Expand description
Builder for DefaultCredentialProvider.
Use env / config_file to customize providers, no_env /
no_config_file to remove them from the chain, and build() to construct
the provider.
§Example
use reqsign_oracle::{
ConfigFileCredentialProvider, DefaultCredentialProvider, EnvCredentialProvider,
};
let provider = DefaultCredentialProvider::builder()
.env(EnvCredentialProvider::new())
.no_config_file()
.config_file(ConfigFileCredentialProvider::new())
.build();Implementations§
Source§impl DefaultCredentialProviderBuilder
impl DefaultCredentialProviderBuilder
Sourcepub fn env(self, provider: EnvCredentialProvider) -> Self
pub fn env(self, provider: EnvCredentialProvider) -> Self
Set the environment credential provider slot.
Sourcepub fn config_file(self, provider: ConfigFileCredentialProvider) -> Self
pub fn config_file(self, provider: ConfigFileCredentialProvider) -> Self
Set the config-file credential provider slot.
Sourcepub fn no_config_file(self) -> Self
pub fn no_config_file(self) -> Self
Remove the config-file credential provider slot.
Sourcepub fn build(self) -> DefaultCredentialProvider
pub fn build(self) -> DefaultCredentialProvider
Build the DefaultCredentialProvider with the configured options.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DefaultCredentialProviderBuilder
impl RefUnwindSafe for DefaultCredentialProviderBuilder
impl Send for DefaultCredentialProviderBuilder
impl Sync for DefaultCredentialProviderBuilder
impl Unpin for DefaultCredentialProviderBuilder
impl UnsafeUnpin for DefaultCredentialProviderBuilder
impl UnwindSafe for DefaultCredentialProviderBuilder
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