[−][src]Struct gcloud_ctx::ConfigurationStore
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]
&mut self,
src_name: &str,
dest_name: &str,
force: bool
) -> Result<()>
Copy an existing configuration, preserving all properties
pub fn create(
&mut self,
name: &str,
properties: &Properties,
force: bool
) -> Result<()>[src]
&mut self,
name: &str,
properties: &Properties,
force: bool
) -> Result<()>
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]
&mut self,
old_name: &str,
new_name: &str,
force: bool
) -> Result<()>
Rename a configuration
pub fn find_by_name(&self, name: &str) -> Option<&Configuration>[src]
Find a configuration by name
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ConfigurationStore
impl Send for ConfigurationStore
impl Sync for ConfigurationStore
impl Unpin for ConfigurationStore
impl UnwindSafe for ConfigurationStore
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,