Skip to main content

build_error_enum

Function build_error_enum 

Source
pub fn build_error_enum(contract_name: &str, variants: &[String]) -> RustItem
Expand description

Build a #[derive(Debug, thiserror::Error)] enum for contract error types.

Each variant gets a #[error("VariantName")] attribute for Display impl.