pub struct RouterProfiles { /* private fields */ }Expand description
Indexed collection of routing profiles loaded from config.
Implementations§
Source§impl RouterProfiles
impl RouterProfiles
Sourcepub fn from_config(config: &RouterConfig) -> RouterProfiles
pub fn from_config(config: &RouterConfig) -> RouterProfiles
Build a profile index from a RouterConfig.
Sourcepub fn get(&self, name: &str) -> Option<&RouterProfile>
pub fn get(&self, name: &str) -> Option<&RouterProfile>
Get a profile by exact name (no fallback).
Sourcepub fn get_with_fallback(&self, name: &str) -> Option<&RouterProfile>
pub fn get_with_fallback(&self, name: &str) -> Option<&RouterProfile>
Get a profile by name, falling back to the default profile.
Sourcepub fn default_profile(&self) -> Option<&RouterProfile>
pub fn default_profile(&self) -> Option<&RouterProfile>
Get the default profile.
Sourcepub fn tier_config(
&self,
profile_name: &str,
tier: RouterTier,
) -> Option<&RoutedTierConfig>
pub fn tier_config( &self, profile_name: &str, tier: RouterTier, ) -> Option<&RoutedTierConfig>
Get the RoutedTierConfig for a specific profile and tier.
Sourcepub fn profile_names(&self) -> Vec<&str>
pub fn profile_names(&self) -> Vec<&str>
List all profile names.
Trait Implementations§
Source§impl Clone for RouterProfiles
impl Clone for RouterProfiles
Source§fn clone(&self) -> RouterProfiles
fn clone(&self) -> RouterProfiles
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 moreAuto Trait Implementations§
impl Freeze for RouterProfiles
impl RefUnwindSafe for RouterProfiles
impl Send for RouterProfiles
impl Sync for RouterProfiles
impl Unpin for RouterProfiles
impl UnsafeUnpin for RouterProfiles
impl UnwindSafe for RouterProfiles
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