pub struct ClientConfiguration { /* private fields */ }
Expand description
All the config data that’s parsed from config sources
Implementations§
source§impl ClientConfiguration
impl ClientConfiguration
sourcepub fn builder() -> ClientConfigurationBuilder
pub fn builder() -> ClientConfigurationBuilder
Create a new configuration builder with the given tokens.
sourcepub fn api_url(&self) -> &str
pub fn api_url(&self) -> &str
URL to access the QCS API. Defaults to DEFAULT_API_URL
.
sourcepub fn grpc_api_url(&self) -> &str
pub fn grpc_api_url(&self) -> &str
URL to access the gRPC API. Defaults to the value of the QCS_SETTINGS_APPLICATIONS_GRPC_URL
environment variable if set, DEFAULT_GRPC_API_URL
otherwise.
sourcepub fn quilc_url(&self) -> &str
pub fn quilc_url(&self) -> &str
URL to access quilc
. Defaults to the value of the QCS_SETTINGS_APPLICATIONS_QUILC_URL
environment variable if set, DEFAULT_QUILC_URL
otherwise.
sourcepub fn qvm_url(&self) -> &str
pub fn qvm_url(&self) -> &str
URL to access QVM. Defaults to the value of the QCS_SETTINGS_APPLICATIONS_QVM_URL
environment variable if set, DEFAULT_QVM_URL
otherwise.
source§impl ClientConfiguration
impl ClientConfiguration
sourcepub async fn load_default() -> Result<Self, LoadError>
pub async fn load_default() -> Result<Self, LoadError>
Attempt to load config files from ~/.qcs
and create a Configuration object
for use with the QCS API using the default profile.
See https://docs.rigetti.com/qcs/references/qcs-client-configuration for details.
§Errors
See LoadError
.
sourcepub async fn load_profile(profile_name: String) -> Result<Self, LoadError>
pub async fn load_profile(profile_name: String) -> Result<Self, LoadError>
Attempt to load config files from ~/.qcs
and create a Configuration object
for use with the QCS API using the specified profile.
See https://docs.rigetti.com/qcs/references/qcs-client-configuration for details.
§Errors
See LoadError
.
sourcepub async fn get_bearer_access_token(&self) -> Result<String, RefreshError>
pub async fn get_bearer_access_token(&self) -> Result<String, RefreshError>
sourcepub async fn refresh(&self) -> Result<String, RefreshError>
pub async fn refresh(&self) -> Result<String, RefreshError>
Refresh the authentication tokens and return the new access token if successful.
§Errors
See RefreshError
.
Trait Implementations§
source§impl Clone for ClientConfiguration
impl Clone for ClientConfiguration
source§fn clone(&self) -> ClientConfiguration
fn clone(&self) -> ClientConfiguration
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more