[−][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]
impl Debug for RestrictConfig
[src]
Auto Trait Implementations
impl RefUnwindSafe for RestrictConfig
impl Send for RestrictConfig
impl Sync for RestrictConfig
impl Unpin for RestrictConfig
impl UnwindSafe for RestrictConfig
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> 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, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,