Enum cosmwasm_std::SystemError
source · #[non_exhaustive]
pub enum SystemError {
InvalidRequest {
error: String,
request: Binary,
},
InvalidResponse {
error: String,
response: Binary,
},
NoSuchContract {
addr: String,
},
Unknown {},
UnsupportedRequest {
kind: String,
},
}
Expand description
SystemError is used for errors inside the VM and is API friendly (i.e. serializable).
This is used on return values for Querier as a nested result: Result<StdResult
Such errors are only created by the VM. The error type is defined in the standard library, to ensure the contract understands the error format without creating a dependency on cosmwasm-vm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
source§impl Clone for SystemError
impl Clone for SystemError
source§fn clone(&self) -> SystemError
fn clone(&self) -> SystemError
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 SystemError
impl Debug for SystemError
source§impl<'de> Deserialize<'de> for SystemError
impl<'de> Deserialize<'de> for SystemError
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 Display for SystemError
impl Display for SystemError
source§impl Error for SystemError
impl Error for SystemError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl JsonSchema for SystemError
impl JsonSchema for SystemError
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl PartialEq<SystemError> for SystemError
impl PartialEq<SystemError> for SystemError
source§fn eq(&self, other: &SystemError) -> bool
fn eq(&self, other: &SystemError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.