pub enum Callback {
Query(Result<Vec<Binary>, ErrorResponse>),
Execute(Result<ExecutionResponse, String>),
FatalError(String),
}
Variants§
Query(Result<Vec<Binary>, ErrorResponse>)
Result of executing the requested query, or an error.
result[i] corresponds to the i’th query and contains the base64 encoded query response.
Execute(Result<ExecutionResponse, String>)
Result of executing the requested messages, or an error.
14/04/23: if a submessage errors the reply handler can see
codespace: wasm, code: 5
, but not the actual error. as a
result, we can’t return good errors for Execution and this
error string will only tell you the error’s codespace. for
example, an out-of-gas error is code 11 and looks like
codespace: sdk, code: 11
.
FatalError(String)
An error occured that could not be recovered from. The only
known way that this can occur is message handling running out
of gas, in which case the error will be codespace: sdk, code: 11
.
This error is not named becuase it could also occur due to a panic or unhandled error during message processing. We don’t expect this to happen and have carefully written the code to avoid it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Callback
impl<'de> Deserialize<'de> for Callback
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>,
Source§impl JsonSchema for Callback
impl JsonSchema for Callback
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moreimpl StructuralPartialEq for Callback
Auto Trait Implementations§
impl Freeze for Callback
impl RefUnwindSafe for Callback
impl Send for Callback
impl Sync for Callback
impl Unpin for Callback
impl UnwindSafe for Callback
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more