difftreelog
doc: builtin trait
in: master
1 file changed
crates/jrsonnet-evaluator/src/function/builtin.rsdiffbeforeafterboth13 pub has_default: bool,13 pub has_default: bool,14}14}151516/// Do not implement it directly, instead use #[builtin] macro16/// Description of function defined by native code17///18/// Prefer to use #[builtin] macro, instead of manual implementation of this trait17pub trait Builtin: Trace {19pub trait Builtin: Trace {20 /// Function name to be used in stack traces18 fn name(&self) -> &str;21 fn name(&self) -> &str;22 /// Parameter names for named calls19 fn params(&self) -> &[BuiltinParam];23 fn params(&self) -> &[BuiltinParam];24 /// Call the builtin20 fn call(&self, s: State, ctx: Context, loc: CallLocation, args: &dyn ArgsLike) -> Result<Val>;25 fn call(&self, s: State, ctx: Context, loc: CallLocation, args: &dyn ArgsLike) -> Result<Val>;21}26}2227