Make RhaiResult internal.

This commit is contained in:
Stephen Chung
2021-03-03 22:49:29 +08:00
parent dfc1ea692f
commit ed568a9395
6 changed files with 11 additions and 7 deletions

View File

@@ -934,7 +934,7 @@ impl Engine {
}
/// Search for a module within an imports stack.
/// [`Position`] in [`EvalAltResult`] is [`None`][Position::None] and must be set afterwards.
/// [`Position`] in [`EvalAltResult`] is [`NONE`][Position::NONE] and must be set afterwards.
pub fn search_imports(
&self,
mods: &Imports,

View File

@@ -42,7 +42,7 @@ pub trait RegisterFn<FN, ARGS, RET> {
fn register_fn(&mut self, name: &str, f: FN) -> &mut Self;
}
/// Trait to register fallible custom functions returning [`Result`]`<`[`Dynamic`]`, `[`Box`]`<`[`EvalAltResult`]`>>` with the [`Engine`].
/// Trait to register fallible custom functions returning [`Result`]`<`[`Dynamic`]`, `[`Box`]`<`[`EvalAltResult`][crate::EvalAltResult]`>>` with the [`Engine`].
pub trait RegisterResultFn<FN, ARGS> {
/// Register a custom fallible function with the [`Engine`].
///

View File

@@ -88,7 +88,7 @@ mod token;
mod r#unsafe;
mod utils;
pub type RhaiResult = Result<Dynamic, stdlib::boxed::Box<EvalAltResult>>;
type RhaiResult = Result<Dynamic, stdlib::boxed::Box<EvalAltResult>>;
/// The system integer type. It is defined as [`i64`].
///

View File

@@ -2,9 +2,10 @@
pub use crate::fn_native::{CallableFunction, FnCallArgs};
pub use crate::stdlib::{any::TypeId, boxed::Box, format, mem, string::ToString, vec as new_vec};
use crate::RhaiResult;
pub use crate::{
Dynamic, Engine, EvalAltResult, FnAccess, FnNamespace, ImmutableString, Module,
NativeCallContext, Position, RegisterFn, RegisterResultFn, RhaiResult,
NativeCallContext, Position, RegisterFn, RegisterResultFn,
};
#[cfg(not(features = "no_module"))]