pub struct ServiceConfigManager {
pub active: Option<String>,
pub default_profile: Option<String>,
pub profiles: BTreeMap<String, ServiceControlProfile>,
pub configs: HashMap<String, ServiceConfig>,
}Fields§
§active: Option<String>当前激活配置名
default_profile: Option<String>新会话默认使用的控制模板名(Phase 1: 仅加载与展示,不自动绑定)。
profiles: BTreeMap<String, ServiceControlProfile>可复用控制模板。
configs: HashMap<String, ServiceConfig>站点集合。公共序列化使用 stations,仍兼容读取 legacy configs。
Implementations§
Source§impl ServiceConfigManager
impl ServiceConfigManager
pub fn stations(&self) -> &HashMap<String, ServiceConfig>
pub fn stations_mut(&mut self) -> &mut HashMap<String, ServiceConfig>
pub fn station(&self, name: &str) -> Option<&ServiceConfig>
pub fn station_mut(&mut self, name: &str) -> Option<&mut ServiceConfig>
pub fn contains_station(&self, name: &str) -> bool
pub fn station_count(&self) -> usize
pub fn has_stations(&self) -> bool
pub fn active_station(&self) -> Option<&ServiceConfig>
pub fn profile(&self, name: &str) -> Option<&ServiceControlProfile>
pub fn default_profile_ref(&self) -> Option<(&str, &ServiceControlProfile)>
Trait Implementations§
Source§impl Clone for ServiceConfigManager
impl Clone for ServiceConfigManager
Source§fn clone(&self) -> ServiceConfigManager
fn clone(&self) -> ServiceConfigManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ServiceConfigManager
impl Debug for ServiceConfigManager
Source§impl Default for ServiceConfigManager
impl Default for ServiceConfigManager
Source§fn default() -> ServiceConfigManager
fn default() -> ServiceConfigManager
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ServiceConfigManager
impl<'de> Deserialize<'de> for ServiceConfigManager
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
Auto Trait Implementations§
impl Freeze for ServiceConfigManager
impl RefUnwindSafe for ServiceConfigManager
impl Send for ServiceConfigManager
impl Sync for ServiceConfigManager
impl Unpin for ServiceConfigManager
impl UnsafeUnpin for ServiceConfigManager
impl UnwindSafe for ServiceConfigManager
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