[−][src]Struct ketos::restrict::RestrictConfig
Contains parameters configuring restrictions of runtime code execution
See module-level documentation for an example of its use.
Fields
execution_time: Option<Duration>
Limits the maximum execution time, beginning from a call into the virtual machine, until the topmost function returns.
If the user desires to limit total execution time of multiple separate function calls, the user must track execution time and adjust this limit manually.
call_stack_size: usize
Limits the call stack depth during execution to a number of nested functions calls
value_stack_size: usize
Limits the number of values that can be stored on the stack during execution
namespace_size: usize
Limits the maximum number of values that can be stored in a GlobalScope
memory_limit: usize
Memory limit during execution of code. This is not a specific measure of bytes; it's more an abstract estimate of values held during execution.
max_integer_size: usize
Maximum size, in bits, of integer and ratio values
max_syntax_nesting: usize
Maximum nested depth of syntactical elements
Methods
impl RestrictConfig
[src]
pub fn permissive() -> RestrictConfig
[src]
Returns a RestrictConfig
that is most permissive.
No restrictions are placed on executing code.
pub fn strict() -> RestrictConfig
[src]
Returns a RestrictConfig
that is most strict.
Small programs with short runtimes should not have a problem operating within these restrictions.
Trait Implementations
impl Clone for RestrictConfig
[src]
fn clone(&self) -> RestrictConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for RestrictConfig
[src]
Auto Trait Implementations
impl Send for RestrictConfig
impl Sync for RestrictConfig
Blanket Implementations
impl<T> AnyValue for T where
T: Any,
[src]
T: Any,
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,