Enum pocket_ic::WasmResult
source · pub enum WasmResult {
Reply(Vec<u8>),
Reject(String),
}Expand description
This struct describes the different types that executing a WASM function in a canister can produce.
Variants§
Reply(Vec<u8>)
Raw response, returned in a successful case.
Reject(String)
Returned with an error message when the canister decides to reject the message.
Trait Implementations§
source§impl Clone for WasmResult
impl Clone for WasmResult
source§fn clone(&self) -> WasmResult
fn clone(&self) -> WasmResult
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 WasmResult
impl Debug for WasmResult
source§impl<'de> Deserialize<'de> for WasmResult
impl<'de> Deserialize<'de> for WasmResult
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
source§impl Hash for WasmResult
impl Hash for WasmResult
source§impl Ord for WasmResult
impl Ord for WasmResult
source§fn cmp(&self, other: &WasmResult) -> Ordering
fn cmp(&self, other: &WasmResult) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for WasmResult
impl PartialEq for WasmResult
source§fn eq(&self, other: &WasmResult) -> bool
fn eq(&self, other: &WasmResult) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for WasmResult
impl PartialOrd for WasmResult
source§fn partial_cmp(&self, other: &WasmResult) -> Option<Ordering>
fn partial_cmp(&self, other: &WasmResult) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Serialize for WasmResult
impl Serialize for WasmResult
impl Eq for WasmResult
impl StructuralPartialEq for WasmResult
Auto Trait Implementations§
impl RefUnwindSafe for WasmResult
impl Send for WasmResult
impl Sync for WasmResult
impl Unpin for WasmResult
impl UnwindSafe for WasmResult
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.