EnterpriseConfig

Struct EnterpriseConfig 

Source
pub struct EnterpriseConfig { /* private fields */ }
Expand description

Enterprise-grade configuration manager with caching and access control

Implementations§

Source§

impl EnterpriseConfig

Source

pub fn new() -> Self

Create new config with defaults

Source

pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>

Load configuration from file with caching

Source

pub fn from_string(content: &str, format: Option<&str>) -> Result<Self>

Load configuration from string with caching

Source

pub fn get(&self, key: &str) -> Option<&Value>

Get value with default fallback - enterprise API

Source

pub fn get_or<T>(&self, key: &str, default: T) -> T
where T: From<Value> + Clone,

Get a value or return a default (ZERO-COPY optimized)

Source

pub fn get_or_default(&self, key: &str) -> Option<Value>

Get with default value from defaults table

Source

pub fn exists(&self, key: &str) -> bool

Check if key exists (enterprise API)

Source

pub fn set(&mut self, key: &str, value: Value) -> Result<()>

Set value (enterprise API)

Source

pub fn set_default(&mut self, key: &str, value: Value)

Set default value for key

Source

pub fn save(&self) -> Result<()>

Save configuration to file (format-preserving when possible)

Source

pub fn save_to<P: AsRef<Path>>(&self, path: P) -> Result<()>

Save to specific file

Source

pub fn keys(&self) -> Vec<String>

Get all keys (for debugging/inspection)

Source

pub fn make_read_only(&mut self)

Make config read-only for security

Source

pub fn clear(&mut self) -> Result<()>

Clear cache (enterprise operation)

Source

pub fn merge(&mut self, other: &EnterpriseConfig) -> Result<()>

Merge another config into this one

Trait Implementations§

Source§

impl Debug for EnterpriseConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.