[][src]Struct gcloud_ctx::ConfigurationStore

pub struct ConfigurationStore { /* fields omitted */ }

Represents the store of gcloud configurations

Implementations

impl ConfigurationStore[src]

pub fn with_default_location() -> Result<Self>[src]

Opens the configuration store using the OS-specific defaults

If the CLOUDSDK_CONFIG environment variable is set then this will be used, otherwise an OS-specific default location will be used, as defined by the dirs crate, e.g.:

  • Windows: %APPDATA%\gcloud
  • Linux: ~/.config/gcloud
  • Mac: ~/.config/gcloud - note that this does not follow the Apple Developer Guidelines

pub fn with_location(gcloud_path: PathBuf) -> Result<Self>[src]

Opens a configuration store at the given path

pub fn active(&self) -> &str[src]

Get the name of the currently active configuration

pub fn configurations(&self) -> Vec<&Configuration>[src]

Get the collection of currently available configurations

pub fn is_active(&self, configuration: &Configuration) -> bool[src]

Check if the given configuration is active

pub fn activate(&mut self, name: &str) -> Result<()>[src]

Activate a configuration by name

pub fn copy(
    &mut self,
    src_name: &str,
    dest_name: &str,
    force: bool
) -> Result<()>
[src]

Copy an existing configuration, preserving all properties

pub fn create(
    &mut self,
    name: &str,
    properties: &Properties,
    force: bool
) -> Result<()>
[src]

Create a new configuration

pub fn describe(&self, name: &str) -> Result<Properties>[src]

Describe the properties in the given configuration

pub fn rename(
    &mut self,
    old_name: &str,
    new_name: &str,
    force: bool
) -> Result<()>
[src]

Rename a configuration

pub fn find_by_name(&self, name: &str) -> Option<&Configuration>[src]

Find a configuration by name

Trait Implementations

impl Debug for ConfigurationStore[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.