有没有办法让我在 Substrate 模块中使用标准的 Result<T, E> 类型?

Is there a way for me to use the standard Result<T, E> type inside a Substrate module?

Substrate 已经将自己的结果类型定义为 Result<(), &'static str> 并且不允许我使用通用类型。如何使用 Rust 标准 Result<T, E> 类型?

可以在模块的私有函数中使用 Rust 标准结果类型,但不能在可调度函数中使用。

你需要先通过use rstd::result导入它,然后像result::Result<your-value-type, your-error-type>一样使用它。