pub struct RuntimeConfig {
pub timeout_seconds: u64,
pub memory_limit_mb: u64,
pub network_mode: NetworkMode,
pub enable_monitoring: bool,
pub blockchain_config: HashMap<String, Value>,
pub security_config: SecurityConfig,
}Expand description
Runtime configuration with security features
Fields§
§timeout_seconds: u64§memory_limit_mb: u64§network_mode: NetworkMode§enable_monitoring: bool§blockchain_config: HashMap<String, Value>§security_config: SecurityConfigSecurity configuration
Implementations§
Source§impl RuntimeConfig
impl RuntimeConfig
Sourcepub fn new(
timeout_seconds: u64,
memory_limit_mb: u64,
network_mode: NetworkMode,
) -> Self
pub fn new( timeout_seconds: u64, memory_limit_mb: u64, network_mode: NetworkMode, ) -> Self
Create a new runtime configuration
Sourcepub fn local_development() -> Self
pub fn local_development() -> Self
Create a configuration for local development
Sourcepub fn production() -> Self
pub fn production() -> Self
Create a configuration for production
Sourcepub fn with_security_config(self, security_config: SecurityConfig) -> Self
pub fn with_security_config(self, security_config: SecurityConfig) -> Self
Set security configuration
Sourcepub fn with_blockchain_config(self, key: String, value: Value) -> Self
pub fn with_blockchain_config(self, key: String, value: Value) -> Self
Set blockchain-specific configuration
Sourcepub fn with_monitoring(self, enabled: bool) -> Self
pub fn with_monitoring(self, enabled: bool) -> Self
Enable or disable monitoring
Sourcepub fn is_development(&self) -> bool
pub fn is_development(&self) -> bool
Check if this is a development configuration
Sourcepub fn is_production(&self) -> bool
pub fn is_production(&self) -> bool
Check if this is a production configuration
Trait Implementations§
Source§impl Clone for RuntimeConfig
impl Clone for RuntimeConfig
Source§fn clone(&self) -> RuntimeConfig
fn clone(&self) -> RuntimeConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 RuntimeConfig
impl Debug for RuntimeConfig
Source§impl Default for RuntimeConfig
impl Default for RuntimeConfig
Source§impl<'de> Deserialize<'de> for RuntimeConfig
impl<'de> Deserialize<'de> for RuntimeConfig
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 RuntimeConfig
impl RefUnwindSafe for RuntimeConfig
impl Send for RuntimeConfig
impl Sync for RuntimeConfig
impl Unpin for RuntimeConfig
impl UnwindSafe for RuntimeConfig
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