Enum protos::sp_wsm::WASMExitCode
source · pub enum WASMExitCode {
WASM_EXIT_CODE_UNSET = 0,
WASM_EXIT_CODE_TRUE = 1,
WASM_EXIT_CODE_FALSE = 2,
WASM_EXIT_CODE_ERROR = 3,
}Expand description
Included in Wasm response; the SDK should use the WASMExitCode to determine what to do next - should it execute next step, should it notify or should it stop execution/abort the rest of the steps in current or all pipelines.
Example:
a. Wasm func returns WASM_EXIT_CODE_FALSE - read PipelineStep.on_false conditions to determine what to do next.
b. Wasm func returns WASM_EXIT_CODE_TRUE - read PipelineStep.on_true conditions to determine what to do next.
.. and so on. TODO: This might be a dupe - should Wasm use ExecStatus instead of this? protolint:disable:next ENUM_FIELD_NAMES_PREFIX
Variants§
Trait Implementations§
source§impl Clone for WASMExitCode
impl Clone for WASMExitCode
source§fn clone(&self) -> WASMExitCode
fn clone(&self) -> WASMExitCode
Returns a copy 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 WASMExitCode
impl Debug for WASMExitCode
source§impl Default for WASMExitCode
impl Default for WASMExitCode
source§impl Enum for WASMExitCode
impl Enum for WASMExitCode
source§fn from_i32(value: i32) -> Option<WASMExitCode>
fn from_i32(value: i32) -> Option<WASMExitCode>
Try to create an enum from
i32 value.
Return None if value is unknown.source§fn from_str(str: &str) -> Option<WASMExitCode>
fn from_str(str: &str) -> Option<WASMExitCode>
Try to create an enum from
&str value.
Return None if str is unknown.source§const VALUES: &'static [WASMExitCode] = _
const VALUES: &'static [WASMExitCode] = _
All enum values for enum type.
source§impl EnumFull for WASMExitCode
impl EnumFull for WASMExitCode
source§fn enum_descriptor() -> EnumDescriptor
fn enum_descriptor() -> EnumDescriptor
Get enum descriptor by type.
source§fn descriptor(&self) -> EnumValueDescriptor
fn descriptor(&self) -> EnumValueDescriptor
Get enum value descriptor.
source§impl Hash for WASMExitCode
impl Hash for WASMExitCode
source§impl PartialEq for WASMExitCode
impl PartialEq for WASMExitCode
source§fn eq(&self, other: &WASMExitCode) -> bool
fn eq(&self, other: &WASMExitCode) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for WASMExitCode
impl Eq for WASMExitCode
impl StructuralPartialEq for WASMExitCode
Auto Trait Implementations§
impl Freeze for WASMExitCode
impl RefUnwindSafe for WASMExitCode
impl Send for WASMExitCode
impl Sync for WASMExitCode
impl Unpin for WASMExitCode
impl UnwindSafe for WASMExitCode
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