pub struct CliCredentials { /* private fields */ }Expand description
Thread-safe, lazily loaded credentials from the Volcengine CLI config.
Implementations§
Source§impl CliCredentials
impl CliCredentials
Sourcepub fn new(config_path: Option<PathBuf>, profile: Option<String>) -> Self
pub fn new(config_path: Option<PathBuf>, profile: Option<String>) -> Self
Constructs a CLI credential source.
An empty path follows VOLCENGINE_CLI_CONFIG_FILE, then defaults to
~/.volcengine/config.json. An empty profile follows
VOLCENGINE_PROFILE, VOLCSTACK_PROFILE, config.current, and finally
default.
Sourcepub fn get(&self) -> Result<CredentialValue>
pub fn get(&self) -> Result<CredentialValue>
Returns a cached credential or refreshes it when its provider expires.
Auto Trait Implementations§
impl !Freeze for CliCredentials
impl RefUnwindSafe for CliCredentials
impl Send for CliCredentials
impl Sync for CliCredentials
impl Unpin for CliCredentials
impl UnsafeUnpin for CliCredentials
impl UnwindSafe for CliCredentials
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