pub struct ConfigLoader { /* private fields */ }Expand description
In-memory profile registry; it performs no file or environment loading.
Implementations§
Source§impl ConfigLoader
impl ConfigLoader
Sourcepub fn register_profile(&self, profile: ScanProfile)
pub fn register_profile(&self, profile: ScanProfile)
Registers a profile
Sourcepub fn get_profile(&self, name: &str) -> Option<ScanProfile>
pub fn get_profile(&self, name: &str) -> Option<ScanProfile>
Gets profile by name
Sourcepub fn list_profiles(&self) -> Vec<String>
pub fn list_profiles(&self) -> Vec<String>
Lists all available profiles
Sourcepub fn get_active_profile(&self) -> ScanProfile
pub fn get_active_profile(&self) -> ScanProfile
Gets currently active profile
Sourcepub fn profile_count(&self) -> usize
pub fn profile_count(&self) -> usize
Gets profile count
Sourcepub fn merge_profiles(
&self,
base: &str,
overlay: &str,
) -> Result<ScanProfile, String>
pub fn merge_profiles( &self, base: &str, overlay: &str, ) -> Result<ScanProfile, String>
Overlays every profile field using deterministic collection semantics.
Scalar fields come from overlay. List fields retain the base order,
append overlay-only values in overlay order, and remove duplicates.
Overlay option values replace base values with the same key.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ConfigLoader
impl !RefUnwindSafe for ConfigLoader
impl Send for ConfigLoader
impl Sync for ConfigLoader
impl Unpin for ConfigLoader
impl UnsafeUnpin for ConfigLoader
impl UnwindSafe for ConfigLoader
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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