pub struct PluginConfig {
pub name: String,
pub path: String,
pub memory_limit_bytes: u64,
pub fuel_limit: u64,
pub timeout_ms: u64,
}Expand description
Configuration for a single plugin module.
Fields§
§name: StringUnique name identifying this plugin.
path: StringFilesystem path to the .wasm module.
memory_limit_bytes: u64Maximum memory the plugin may allocate (bytes).
fuel_limit: u64Fuel limit (instruction budget) for a single evaluation call.
timeout_ms: u64Maximum wall-clock time for a single evaluation call (milliseconds).
Implementations§
Source§impl PluginConfig
impl PluginConfig
Sourcepub fn validate(&self) -> Result<(), PluginError>
pub fn validate(&self) -> Result<(), PluginError>
Validate configuration bounds.
Returns Err(PluginError::ConfigValidation) on any violation.
Trait Implementations§
Source§impl Clone for PluginConfig
impl Clone for PluginConfig
Source§fn clone(&self) -> PluginConfig
fn clone(&self) -> PluginConfig
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 PluginConfig
impl Debug for PluginConfig
Source§impl<'de> Deserialize<'de> for PluginConfig
impl<'de> Deserialize<'de> for PluginConfig
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 PluginConfig
impl RefUnwindSafe for PluginConfig
impl Send for PluginConfig
impl Sync for PluginConfig
impl Unpin for PluginConfig
impl UnsafeUnpin for PluginConfig
impl UnwindSafe for PluginConfig
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