pub trait ScriptRet {
// Required methods
fn script_ty() -> ScriptTy;
fn into_script_result(self) -> ScriptResult;
}Expand description
What a ScriptFn::from_fn closure may return: a value, or a
Result whose error message reaches the script.
The declared return type is T either way, so the same declaration binds a
closure that can fail and one that cannot.
Required Methods§
Sourcefn into_script_result(self) -> ScriptResult
fn into_script_result(self) -> ScriptResult
The result the body hands the host.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.