pub struct ConfigProfileManager { /* private fields */ }
Expand description
Configuration profile manager
Implementations§
Source§impl ConfigProfileManager
impl ConfigProfileManager
Sourcepub fn list_profiles(&self) -> Vec<String>
pub fn list_profiles(&self) -> Vec<String>
Get available profile names
Sourcepub fn get_profile(&self, name: &str) -> Option<&McpConfigProfile>
pub fn get_profile(&self, name: &str) -> Option<&McpConfigProfile>
Get a profile by name
Sourcepub fn set_active_profile(&mut self, name: String) -> Result<()>
pub fn set_active_profile(&mut self, name: String) -> Result<()>
Set active profile
Sourcepub fn get_active_profile(&self) -> Option<&McpConfigProfile>
pub fn get_active_profile(&self) -> Option<&McpConfigProfile>
Get active profile
Sourcepub fn register_profile(&mut self, profile: McpConfigProfile)
pub fn register_profile(&mut self, profile: McpConfigProfile)
Register a custom profile
Sourcepub fn validate_profile(
&self,
profile: &McpConfigProfile,
) -> Result<Vec<String>>
pub fn validate_profile( &self, profile: &McpConfigProfile, ) -> Result<Vec<String>>
Validate a configuration profile
Sourcepub fn profile_from_env() -> Result<McpConfigProfile>
pub fn profile_from_env() -> Result<McpConfigProfile>
Create a profile from environment variables
Trait Implementations§
Source§impl Clone for ConfigProfileManager
impl Clone for ConfigProfileManager
Source§fn clone(&self) -> ConfigProfileManager
fn clone(&self) -> ConfigProfileManager
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ConfigProfileManager
impl Debug for ConfigProfileManager
Auto Trait Implementations§
impl Freeze for ConfigProfileManager
impl RefUnwindSafe for ConfigProfileManager
impl Send for ConfigProfileManager
impl Sync for ConfigProfileManager
impl Unpin for ConfigProfileManager
impl UnwindSafe for ConfigProfileManager
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§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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more