Substrate already defines its own result type as Result<(), &'static str>
and doesn't let me use the generic type. How can I use the Rust standard Result<T, E>
type?
It's possible to use the Rust standard Result type in a module's private function, but not the dispatchable function.
You need to import it first by use rstd::result
, then use it like result::Result<your-value-type, your-error-type>
.