pub struct ClientConfiguration { /* private fields */ }Expand description
All the config data that’s parsed from config sources
Implementations
sourceimpl ClientConfiguration
impl ClientConfiguration
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.
sourcepub fn quilc_url(&self) -> &str
pub fn quilc_url(&self) -> &str
URL to access quilc over TCP. Defaults to DEFAULT_QUILC_URL.
sourcepub fn qvm_url(&self) -> &str
pub fn qvm_url(&self) -> &str
URL to access QVM over HTTP. Defaults to DEFAULT_QVM_URL.
sourceimpl ClientConfiguration
impl ClientConfiguration
sourcepub async fn load() -> Result<Self, LoadError>
pub async fn load() -> Result<Self, LoadError>
Attempt to load config files from ~/.qcs and create a Configuration object for use with the QCS API.
See https://docs.rigetti.com/qcs/references/qcs-client-configuration for details.
Errors
See LoadError.
sourcepub async fn set_tokens(&mut self, tokens: Tokens)
pub async fn set_tokens(&mut self, tokens: Tokens)
Manually set access and refresh tokens
Most users do not want to use this. Instead, use ClientConfiguration::load(), which uses your
QCS configuration.
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
sourceimpl Clone for ClientConfiguration
impl Clone for ClientConfiguration
sourcefn clone(&self) -> ClientConfiguration
fn clone(&self) -> ClientConfiguration
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 moresourceimpl Debug for ClientConfiguration
impl Debug for ClientConfiguration
Auto Trait Implementations
impl !RefUnwindSafe for ClientConfiguration
impl Send for ClientConfiguration
impl Sync for ClientConfiguration
impl Unpin for ClientConfiguration
impl !UnwindSafe for ClientConfiguration
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