pub struct LuaEngineConfig {Show 19 fields
pub history_size: usize,
pub max_history_bytes_per_script: usize,
pub max_history_bytes_total: usize,
pub max_memory_bytes: usize,
pub default_timeout_ms: u64,
pub instruction_limit: u64,
pub hook_interval: u32,
pub max_source_bytes: usize,
pub max_total_source_bytes: usize,
pub max_context_bytes: usize,
pub max_target_bytes: usize,
pub max_payload_bytes: usize,
pub max_parameters: usize,
pub max_parameter_key_bytes: usize,
pub max_parameter_value_bytes: usize,
pub max_output_bytes: usize,
pub max_return_bytes: usize,
pub max_scripts: usize,
pub max_concurrent_executions: usize,
}Expand description
Resource configuration for one host-owned Lua registry.
Every value is validated against a nonzero hard ceiling before the registry allocates storage or accepts executable source.
Fields§
§history_size: usizeMaximum execution-history entries retained per script.
max_history_bytes_per_script: usizeMaximum retained history bytes per script.
max_history_bytes_total: usizeMaximum retained history bytes across the registry.
max_memory_bytes: usizeMaximum memory per fresh Lua VM, in bytes.
default_timeout_ms: u64Monotonic wall-clock deadline for one execution, in milliseconds.
instruction_limit: u64Deterministic VM instruction ceiling for one execution.
hook_interval: u32Number of VM instructions between host budget checks.
max_source_bytes: usizeMaximum registered source bytes.
max_total_source_bytes: usizeMaximum source bytes retained across the registry.
max_context_bytes: usizeMaximum aggregate context bytes.
max_target_bytes: usizeMaximum target bytes inside a context.
max_payload_bytes: usizeMaximum payload bytes inside a context.
max_parameters: usizeMaximum parameter entries inside a context.
max_parameter_key_bytes: usizeMaximum bytes in one parameter key.
max_parameter_value_bytes: usizeMaximum bytes in one parameter value.
max_output_bytes: usizeMaximum bytes emitted by one execution.
max_return_bytes: usizeMaximum bytes in the supported scalar return value.
max_scripts: usizeMaximum scripts registered at once.
max_concurrent_executions: usizeMaximum Lua VMs executing concurrently in this registry.
Implementations§
Source§impl LuaEngineConfig
impl LuaEngineConfig
Sourcepub fn validate(&self) -> Result<(), LuaConfigError>
pub fn validate(&self) -> Result<(), LuaConfigError>
Validates every configured limit before it can control allocation or execution.
Trait Implementations§
Source§impl Clone for LuaEngineConfig
impl Clone for LuaEngineConfig
Source§fn clone(&self) -> LuaEngineConfig
fn clone(&self) -> LuaEngineConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LuaEngineConfig
impl Debug for LuaEngineConfig
Source§impl Default for LuaEngineConfig
impl Default for LuaEngineConfig
Source§impl<'de> Deserialize<'de> for LuaEngineConfig
impl<'de> Deserialize<'de> for LuaEngineConfig
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>,
impl Eq for LuaEngineConfig
Source§impl PartialEq for LuaEngineConfig
impl PartialEq for LuaEngineConfig
Source§impl Serialize for LuaEngineConfig
impl Serialize for LuaEngineConfig
impl StructuralPartialEq for LuaEngineConfig
Auto Trait Implementations§
impl Freeze for LuaEngineConfig
impl RefUnwindSafe for LuaEngineConfig
impl Send for LuaEngineConfig
impl Sync for LuaEngineConfig
impl Unpin for LuaEngineConfig
impl UnsafeUnpin for LuaEngineConfig
impl UnwindSafe for LuaEngineConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.