Struct osauth::CloudConfig
source · pub struct CloudConfig { /* private fields */ }
Expand description
Cloud configuration.
This is a source from which sessions and authentications can be created.
It can be loaded from a clouds.yaml
configuration file or from environment variables.
Additionally, the configuration can be serialized and deserialized.
Implementations§
source§impl CloudConfig
impl CloudConfig
sourcepub fn from_config<S: AsRef<str>>(cloud_name: S) -> Result<CloudConfig, Error>
pub fn from_config<S: AsRef<str>>(cloud_name: S) -> Result<CloudConfig, Error>
Create a cloud config from the configuration file.
sourcepub fn from_env() -> Result<CloudConfig, Error>
pub fn from_env() -> Result<CloudConfig, Error>
Create a cloud config from environment variables.
sourcepub async fn create_session(self) -> Result<Session, Error>
pub async fn create_session(self) -> Result<Session, Error>
Create a session from this configuration.
Trait Implementations§
source§impl Clone for CloudConfig
impl Clone for CloudConfig
source§fn clone(&self) -> CloudConfig
fn clone(&self) -> CloudConfig
Returns a copy 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 CloudConfig
impl Debug for CloudConfig
source§impl Default for CloudConfig
impl Default for CloudConfig
source§fn default() -> CloudConfig
fn default() -> CloudConfig
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for CloudConfig
impl<'de> Deserialize<'de> for CloudConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for CloudConfig
impl Serialize for CloudConfig
source§impl TryFrom<CloudConfig> for BasicAuth
impl TryFrom<CloudConfig> for BasicAuth
source§impl TryFrom<CloudConfig> for NoAuth
impl TryFrom<CloudConfig> for NoAuth
source§impl TryFrom<CloudConfig> for Password
impl TryFrom<CloudConfig> for Password
Auto Trait Implementations§
impl RefUnwindSafe for CloudConfig
impl Send for CloudConfig
impl Sync for CloudConfig
impl Unpin for CloudConfig
impl UnwindSafe for CloudConfig
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