pub struct CodeLimits {
pub time_ms: u64,
pub memory_bytes: usize,
pub stack_bytes: usize,
pub max_output_bytes: usize,
pub max_depth: usize,
}Expand description
Resource limits for one code execution.
Fields§
§time_ms: u64Wall-clock execution budget in milliseconds.
memory_bytes: usizeHeap limit in bytes.
stack_bytes: usizeNative stack limit in bytes.
max_output_bytes: usizeMaximum size of the JSON-encoded result.
max_depth: usizeMaximum nesting depth of the result.
Implementations§
Source§impl CodeLimits
impl CodeLimits
Sourcepub fn clamp_to(self, max: &CodeLimits) -> CodeLimits
pub fn clamp_to(self, max: &CodeLimits) -> CodeLimits
Field-wise minimum of self and max: workflow-provided limits may only lower
the operator’s limits, never raise them.
Trait Implementations§
Source§impl Clone for CodeLimits
impl Clone for CodeLimits
impl Copy for CodeLimits
Source§impl Debug for CodeLimits
impl Debug for CodeLimits
Source§impl Default for CodeLimits
impl Default for CodeLimits
Source§impl<'de> Deserialize<'de> for CodeLimitswhere
CodeLimits: Default,
impl<'de> Deserialize<'de> for CodeLimitswhere
CodeLimits: Default,
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
impl Eq for CodeLimits
Source§impl PartialEq for CodeLimits
impl PartialEq for CodeLimits
impl StructuralPartialEq for CodeLimits
Auto Trait Implementations§
impl Forget for CodeLimits
impl Freeze for CodeLimits
impl Move for CodeLimits
impl RefUnwindSafe for CodeLimits
impl Send for CodeLimits
impl Sync for CodeLimits
impl Unpin for CodeLimits
impl UnsafeUnpin for CodeLimits
impl UnwindSafe for CodeLimits
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
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.