pub struct ProfileSet { /* private fields */ }
Expand description
A top-level configuration source containing multiple named profiles
Implementations§
Source§impl EnvConfigSections
impl EnvConfigSections
Sourcepub fn get(&self, key: &str) -> Option<&str>
pub fn get(&self, key: &str) -> Option<&str>
Retrieves a key-value pair from the currently selected profile
Sourcepub fn get_profile(&self, profile_name: &str) -> Option<&Profile>
pub fn get_profile(&self, profile_name: &str) -> Option<&Profile>
Retrieves a named profile from the profile set
Sourcepub fn selected_profile(&self) -> &str
pub fn selected_profile(&self) -> &str
Returns the name of the currently selected profile
Sourcepub fn profiles(&self) -> impl Iterator<Item = &str>
pub fn profiles(&self) -> impl Iterator<Item = &str>
Returns the names of the profiles in this config
Sourcepub fn sso_sessions(&self) -> impl Iterator<Item = &str>
pub fn sso_sessions(&self) -> impl Iterator<Item = &str>
Returns the names of the SSO sessions in this config
Sourcepub fn sso_session(&self, name: &str) -> Option<&SsoSession>
pub fn sso_session(&self, name: &str) -> Option<&SsoSession>
Retrieves a named SSO session from the config
Sourcepub fn other_sections(&self) -> &Properties
pub fn other_sections(&self) -> &Properties
Returns a struct allowing access to other sections in the profile config
Sourcepub fn parse(source: Source) -> Result<EnvConfigSections, EnvConfigParseError>
pub fn parse(source: Source) -> Result<EnvConfigSections, EnvConfigParseError>
Given a Source
of profile config, parse and merge them into a EnvConfigSections
.
Trait Implementations§
Source§impl Clone for EnvConfigSections
impl Clone for EnvConfigSections
Source§fn clone(&self) -> EnvConfigSections
fn clone(&self) -> EnvConfigSections
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 EnvConfigSections
impl Debug for EnvConfigSections
Source§impl Default for EnvConfigSections
impl Default for EnvConfigSections
Source§fn default() -> EnvConfigSections
fn default() -> EnvConfigSections
Returns the “default value” for a type. Read more
Source§impl PartialEq for EnvConfigSections
impl PartialEq for EnvConfigSections
impl Eq for EnvConfigSections
impl StructuralPartialEq for EnvConfigSections
Auto Trait Implementations§
impl Freeze for EnvConfigSections
impl RefUnwindSafe for EnvConfigSections
impl Send for EnvConfigSections
impl Sync for EnvConfigSections
impl Unpin for EnvConfigSections
impl UnwindSafe for EnvConfigSections
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Creates a shared type from an unshared type.