pub enum ScriptResource {
Stack,
AltStack,
ElementSize,
}Expand description
A rich error type for script evaluation failures.
Contains the full execution state at the time of failure, enabling
detailed debugging and error reporting.
A LOCAL interpreter resource the evaluation ran out of — the TypeScript
SDK’s ScriptResourceLimitError (ScriptResource): 'stack',
'alt-stack', 'element-size'. Resource exhaustion is a verdict about the
EVALUATOR’s budget, never about the script’s validity on the network, and
a caller (an overlay door, a wallet) must be able to tell the two apart.
Variants§
Stack
The main stack’s memory budget (memory_limit).
AltStack
The alt stack’s memory budget (memory_limit).
ElementSize
A single element the script asked to allocate (OP_NUM2BIN’s size
operand), refused BEFORE the allocation.
Trait Implementations§
Source§impl Clone for ScriptResource
impl Clone for ScriptResource
Source§fn clone(&self) -> ScriptResource
fn clone(&self) -> ScriptResource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ScriptResource
Source§impl Debug for ScriptResource
impl Debug for ScriptResource
Source§impl Display for ScriptResource
impl Display for ScriptResource
impl Eq for ScriptResource
Source§impl PartialEq for ScriptResource
impl PartialEq for ScriptResource
impl StructuralPartialEq for ScriptResource
Auto Trait Implementations§
impl Freeze for ScriptResource
impl RefUnwindSafe for ScriptResource
impl Send for ScriptResource
impl Sync for ScriptResource
impl Unpin for ScriptResource
impl UnsafeUnpin for ScriptResource
impl UnwindSafe for ScriptResource
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